The most common way to work with and manage MySQL is directly, using the command line or a web-based tool such as phpMyAdmin. If, however, you have more than one database server or need to do routine complex tasks, the former may be too tedious, and the latter may be too simple. Another possible reason for connecting remotely is that your database server is on a different physical machine from your web server.
Using a graphical tool like MySQL Administrator or a tool from a third-party vendor, you can opt to manage your database remotely, without being connected directly to the server. On a Linux server, you typically cannot do this by default, as opening up MySQL to any remote connections is a big security risk. To allow remote access, make the following changes.
1. As root, edit the my.cfg file using a text editor.
2. Find the section labeled [mysqld] and locate the line “skip-networking”. If it is not commented out, add a “#” in front of it to do so.
3. Add the following line with your own IP address, the one you want to connect to the databases (126.96.36.199 is just an example):
bind-address = 188.8.131.52
4. Save the file and exit.
5. Restart mysql:
6. You must grant remote access to the specific databases you want to manage remotely.
mysql -u root -p mysql
mysql> CREATE DATABASE dbname;
mysql> GRANT ALL ON dbname.* TO user@’184.108.40.206’ IDENTIFIED BY ‘PASSWORD’;
You can also do the same thing through phpMyAdmin and even grant access to multiple databases. You should also make sure your firewall will allow remote access to the MySQL port number 3306.