This lesson will teach you on how to connect to a Mysql server remotely.
The connections to a Mysql database server is usally done using connection string which is a sequence of variables which will address a specific database and allow you to connect your code to your MySQL database.
Example of a php script:
$dbh=mysql_connect (“localhost”, “cpuser_dbuser“, “password“) or die (‘I cannot connect to the database because: ‘ . mysql_error());
As default all the IPs will be blocked on the Mysql server for security purpose and we need to manually enable it.
1) Login to the cPanel account. Please note that the database you want to connect should be concerned with this account.
2) In the search box type ‘remote’ and hit enter. Now you will see the Remote Mysql option.
2) Click on the Remote Mysql option.
3) In the Host field, type in the connecting IP address. You can find the IP address of the machine by accessing here
4) Click on ‘Add Host’ and you will see the confirmation in a new page.
You should now be able to connect remotely to your database.
If you find any difficulties for making the connection please contact our support department.
These guys do a great job. Keep up the good work AIMVM team. www.marghotels.comAisten Correya
When choosing a hosting provider, I’m looking for fast, knowledgeable support and reliable systems. aimvm.com provided it all at a great price. www.tranzmedia.inTranzmedia