Home > MySQL, TIP > Enable Remote Access To MySQL

Enable Remote Access To MySQL


Hi there,

By default remote access to MySQL database server is disabled for security reasons. However, some time you need to provide remote access to database server from home or a web server. So here is one more tip arround MySQL


Open your configuration file from MySQL:
>vi /etc/mysql/my.cnf

Search for the entry:
bind-address = 127.0.0.1
and remove this entry or comment out this line!!

Restart your server:
>/etc/init.d/mysql restart


One important thing is to GRANT root access from anywhere:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> exit

And be happy!
ūüôā

  1. No comments yet.
  1. 2012.April.10 at 23:47

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: