Remote MySQL Connection :: How To
Can I remotely connect to mysql? YES!Follow these simple instructions to remotely connect to mysql.
Before you can connect to MySQL, You must enable your computer as an access host. It may sound confusing, but CPanel makes this ver simpe. First, login to cpanel using yourdomain.com/cpanel. Then, on the main menu of CPanel, click [MySQL]. Now, scroll down to about mid way through the page until you see “Access Hosts:”. Under that, you will see a list of all the IPs that are permitted to connect to your mysql databases. As default, only “localhost” will be listed. Directly under that, you will see “Host (% wildcard is allowed):” with a text field next to it. In that text field you can enter your computers IP address. After you enter your IP address, click [Add Host] and your done. Your computer can now remotely connect to your mysql database(s).
How can I find out my computers IP address?
- Simple, just go to http://www.ViewIP.info Wait a minute, my IP constantly changes!
Okay, you have a dynamic IP address. Therefore, everytime you go online, or every once in awhile, your IP changes. You have a few options here. The most secure, would be to update your IP in “Allowed Hosts” in CPanel (under MySQL) everytime your IP changes. However, you do have other options available. However, you could simply enter “%” (a percentage sign) in the “access hosts” text filed in CPanel (under mysql). This would allow any IP to remotely connect via mysql. Another option: Lets say the first three parts of your IP never change. Then, you could enter 93.138.%.% , where the first two parts are your actual IP address numbers.
After your IP is added to the Access Hosts list:
First, you will have to create a mysql database and assign a user to it. Please see documentation on how to do this, as this article will assume you already have a database setup. Your username and password will be the username and password of the user assigned to the database.
Database name = cpanelusername_databasename
Database username = cpanelusername_databaseusername
MySQL Connection Port = 3306
* The database name and username is clearly displayed in CPanel, in the MySQL area.
Aggregation: ParagonHost, LLC http://www.paragonhost.com“World Class Internet Services”