How to resolve mysql problem when you get code 2003(10061) and 1130

When I use Navicate to connect to mysql on Ubuntu, I got message 2003(10061) firstly.

To resovle this error, I midified one line of file my.cnf. Use command below:

sudo vi /etc/mysql/my.cnf

Then commented out line says "bind-address = 127.0.0.1".

After that I restart mysql. But got another message 1130.

It's the problem of host. Then I logon mysql. Issued command below.

mysql -u root -p

mysql>use mysql;

mysql>select 'host' from user where user='root';

mysql>update user set host = '%' where user ='root';

mysql>flush privileges;

mysql>select 'host'   from user where user='root';

posted on 2015-04-28 14:40  Panderen  阅读(188)  评论(0编辑  收藏  举报

导航