First, modify the my. CNF file under the/etc/MySQL directory and set bind-address to your IP address. Assume It is 192.168.0.240.
[Bash]
Bind-address = 192.168.0.240
[/Bash]
My mysql version is as follows:
[Bash]
MySQL ver 14.14 distrib 5.5.31, for Debian-Linux-GNU (x86_64) using Readline 6.2
[/Bash]
There is no skip-network, so you only need to modify bind-address to save
Then, restart MySQL
[Bash]
Sudo service MySQL restart
[/Bash]
Or
[Bash]
Sudo/etc/init. d/MySQL restart
[/Bash]
Finally, log on to MySQL and run the following command:
[Bash]
Grant all privileges on *. * To 'root' @ '%' identified by 'yourpassword' with grant option;
Flush privileges;
[/Bash]
Replace yourpassword with your database password. '%' indicates that any IP Address can access the database. You can also replace it with a specific IP address.
Remote access again.
Refer:
1. http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
2. http://stackoverflow.com/questions/8380797/enable-remote-mysql-connection