Saturday, October 4, 2008

How to enable grant access to remote system for MySQL server?

In a few step you can allow remote system to access your MySQL server. To implement first you will need to configure your my.cnf which which is located at

/etc/mysql/my.cnf [Debian Linux Environment]
/etc/my.cnf [Red Hat Linux/Fedora/Centos Linux]
/var/db/mysql/my.cnf [FreeBSD]

access the file using

sudo gedit /etc/mysql/my.cnf

check for following line
bind-address in which the local ip address is assigned
bind-address =
So just replace the local ip address with your server ip address e.g. 192.168.XXX.XXX
bind-address = 192.168.XXX.XXX

Thats it now all you need to restart your MySQL server and assign a grant access to remote system.

To restart MySQL server
etc/init.d/mysql restart

To assigned a grant access
GRANT ALL ON user_database_name.* TO remote_user_name@'192.168.x.x' IDENTIFIED BY 'PASSWORD';

Thats it and it is done.. Now
the remote user can access your db..

No comments: