开发者

Unable to connect to MySql database on a Remote linux server from a windows GUI tool

I have setup a mysql database on a linux server on Amazon's EC2. This works well l开发者_Go百科ocally. I can log into the linux box and administer the mysql database

I am trying to connect my local GUI client to the remote mysql and it is failing to connect.

I updated the /etc/mysql/my.cnf file and changed the following:

skip-networking
bind-address            = 0.0.0.0

I am still not able to connect. Any thoughts?

EDIT: I first tried bind-address=0.0.0.0 , then I added skip-networking with bind-address

EDIT #2: I made sure the security group opens on 3306. I also have other ports open which work so I dont think its an amazon specific issue


I generally don't recommend you to open port 3306 for public access (or even with IP restrictions). I personally always tunnel port 3306 with Putty/ssh and then just use localhost to connect to the database.

In this case don't forget to grant privileges for the user like this:

grant all privileges on yourDatabaseName.* to 'yourUserName'@'localhost' identified by "yourUsersPassword";

If you still want to make direct connection, it's possible, that your user still don't have enough privileges. You can try this:

grant all privileges on yourDatabaseName.* to 'yourUserName'@'yourClientsIp' identified by "yourUsersPassword";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜