Enable remote access of MySql on Ubuntu

By default MySQL only listens to localhost, if we want to enable the remote access to it, then we need to made some changes in my.cnf file:

sudo vi /etc/mysql/my.cnf

1

We need to comment out the bind-address and skip-external-locking lines:

#bind-address = 127.0.0.1
# skip-external-locking

2

After making these changes, we need to restart the mysql service:

sudo service mysql restart

3

Grant permission to root from any host:

mysql –u root -p
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

4

Now you can connect with mysql server on Ubuntu from your remote machine:

5

6

Hope this will help you!

Please Remember me in your prayers!

Enjoy :-)

Advertisements

3 responses to “Enable remote access of MySql on Ubuntu

  1. lonoshea June 22, 2015 at 5:42 pm

    Worked like a charm, thanks!

  2. Pingback: Enable remote access of MySql on Ubuntu 14.x | UX/UI Web | S.E.O./S.E.M Web | Graphic Designer Expert

  3. Pingback: Remote Access MySQL บน DigitalOcean | NottFree

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: