使用sqlyog连接ubuntu mysql server错误解决方案

现在很多服务都部署在linux环境中,但是在开发阶段,使用windows远程连接工具,直观,这对开发人员更友好。

下面是我在ubuntu16.04使用mysql- server时,遇到了一下的问题,以及该问题的解决方案。

1.错误码  2003

ERROR 2003: Can't connect to MySQL server on 'localhost' (0)

解决由于mysql的配置文件里面bind-address配置地址(默认值)127.0.0.1  

vim /etc/mysql/mysql.conf.d/mysqld.cnf

将bind-address改成 0.0.0.0

重启mysql服务:/etc/init.d/mysql restart

2.错误码  1130

ERROR 1130: Host 192.168.3.100 is not allowed to connect to this MySQL server

我采用了以下的解决方案

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';

然后重启mysql服务

原文地址:https://www.cnblogs.com/qiutian-guniang/p/8404992.html