Enable MySQL connection from remote host

I usually use SqlDBX for my database operations. Although it is not secure to allow database connections from remote hosts (unless you create a proxy to the server and login as localhost) – but for our test servers, I think it’s more convenient to let secure connections from my local machine within the network.

There are 2 parts to make this work:

1. Modify bind-address inside my.cnf file to allow remote connections

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
bind-address = 0.0.0.0

2. Add mysql user to databse that accepts connections from all hosts

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root_password'; 

Restart the mysql services and you should be able to connect from a MySQL client running on your desktop. Good Luck !!!

Advertisements

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