How do I connect to MySQL from my own computer?
Unless you choose a special option for your database, we disable remote connections to MySQL for security reasons. That means you can only connect to your MySQL database using a script on your website, or the phpMyAdmin program, or the command line on our servers.
This works just fine for almost all databases, and makes your database more secure. (Older versions of MySQL had several security problems that allowed anyone who could make a connection to have full access to a database, even without a password. Disabling remote access to your database makes sure that if a similar security bug is discovered in the future, your database will still be secure.)
How do I enable remote connections?
A small number of users may need to connect to their database using software running on their own computer. You can use the account management control panel to enable remote connections if you wish to do this.
Be sure your database has a strong password.
Be sure your database has a strong password before enabling remote connections. If you don’t, any hacker who can guess your password will be able to modify it remotely.
(Looking for a strong random password? Try “QnbfNmh435H4FRN6”.)
If you’re creating a new database, just check the Allow connections from any computer on the Internet box.
To add remote connections to an existing database:
- Login to our “My Account” control panel (having trouble?)
- Click MySQL Databases
- Locate the database you wish to modify and click Change
- Check the Allow connections from any computer on the Internet box
- Click Save
What settings do I use to connect remotely?
To connect to the MySQL server from your own computer, you will need to use a special server address, or "hostname", which is different from the address you use when connecting from a script. The special hostname is simply your website address, such as www.example.com.
The other connection settings — username, database name, and password — should be the same as you would use to connect from a script on your website. The exact settings to use are shown under "Connecting from other locations" when you view the database connection settings.
Are there any restrictions on remote connections?
Please keep in mind that in the unlikely event a new security problem in MySQL is discovered, we may be forced to disable all remote connections to MySQL to protect your database. You shouldn't absolutely rely on remote access always being available.
How secure are remote connections?
Unfortunately, remote access to MySQL is not very secure. When your remote computer first connects to your MySQL database, the password is encrypted before being transmitted over the Internet. But after that, all data is passed as unencrypted "plain text". If someone was able to view your connection data (such as a "hacker" capturing data from an unencrypted WiFi connection you're using), that person would be able to view part or all of your database.
In particular, never store any sensitive data such as credit card numbers in unencrypted format within the database. Such data should always be encrypted, even if it's never going to be transmitted over the Internet. Encrypting the data will ensure that it stays confidential even if the raw database file is ever stolen or compromised.