Connect MySql Database From remote machine
Many times (Web/Desktop)Application developers need to connect to MySql database server hosted on remote cPanel server to be accessed from their desktop.
Here are the instructions to connect to MySql Database from remote Machine.
=> Enable Connection to Remote Host
- Login to cPanel of the domain
- Go to 'Remote MySql'
- At 'Remote Database Access Hosts'
- add access host IP (i.e. IP of the machine from which database has to be accessed)
- Click on 'Add Host' to finish.
Database Server = Server IP address
Database = cpanelusername_databasename
Database User = cpanelusername_databaseuser
Database Password = (what ever is set)
MySql Serverice Port no. = 3306
=> What if local machine has dynamic IP
- Simpy put '%'(percentage mark) in Add Access Host to allow access from any remote IP.
- Allow subnet only 215.26.%.% (This may be useful if machines having remote access to
Database belongs to same Subnet/ISP).
=> It is recommended to have Static IP if remote connection to database is permanent OR
keep updating IP, if dynamic, into the access host list whenever it changes. This is
secure way for remote connection and to avoid access to unwanted IPs.
*Your IP may need to be allowed the access to 3306 port in the firewall of the server.
Ideal place for discussions related to Linux/Windows server security, Apache, MySQL, MS SQL and PHP, including tutorials and questions.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest