Remote access to mysql

I have a Mysql daemon running on a my Ubuntu system and I was trying to remotely access it from my development machine. That is where hell broke loose because I just couldn’t. I read a lot of articles and stackoverflow articles with no proper resolution. I thought that it is important for me to post on my blog because I am certain this will turn up on google at a later stage when 2 yrs down the road I face the same problem.
I tried changing iptables, mysql bind address etc but none of them worked. So what worked?


# Edit /etc/mysql/my.cnf

Added bind-address as the dev machine’s ip address (or add % if you want to open it up to all ip addresses, though won’t suggest this)

# Add a new user accessible over the network

I used mysql workbench for this. In the administration pane, I added the Ubuntu (mysql) server, created a new user and gave the required access levels. Then I added my dev machine’s IP address as accessible sources

# Restart mysql

sudo service mysql restart

This worked. Other things did not work.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s