Connecting from windows to MYSQL on Ubuntu

7 Nov

When using mysql server on ubuntu, there is a property called  bind-address in the /etc/mysql/my.cnf file. This forces mysql to only listen to localhost.

If you want to connect to mysql from a different box say windows, make sure you comment this line.

Then restrart my sql –  sudo /etc/init.d/mysql restart

Now login to mysql on comand prompt as root  – sudo mysql -u root -p
‘=Enter password

Create a brand new user with this syntax

grant all privileges on *.* TO ‘devuser’@'IP ADDRESS OF WINDOWS’ IDENTIFIED BY ‘NEW PASSWORD’ with grant option;
After this you can use a mysql client like navicat in windows to connect with user devuser, password NEW PASSWORD.

Note that when IP changes you would have to do this all over again.

Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

Gravatar
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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.