How to enable MySQL remote access? I have a MySQL server and I want to enable remote access for a certain IP and localhost only. For some reason I couldn't manage to do it as it doesn't work every time I try. I typed the following command (of course user, password and db where different):

mysql&gt; GRANT ALL ON foo.* TO bar@'192.168.0.1' IDENTIFIED BY 'PASSWORD';

I also disabled skip-networking.

What am I doing wrong then?
You need to change the bind-address parameter to the IP you wish to allow remote access to.  However, most people just comment out the bind-address parameter in the my.cnf file to allow access from anywhere and deal with who can access the DB server with user access control.  I would suggest the latter and not the former. Don't forget to restart mysql server after making changes to my.cnf for the changes to take effect.

Please refer Here for more information.

Additionally, The grant statement should have single quotes around the name as well as the host:

mysql&gt; GRANT ALL ON foo.* TO 'bar'@'192.168.0.1' IDENTIFIED BY 'PASSWORD';


Also, don't forget to 

Flush privileges;