Navicat MySQL连接Linux下MySQL的及2003错误解决方案
1.首先登录mysql
2.为用户授权——需要在mysql里面执行以下语句(开放mysql远程权限)
use mysql;
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
3.打开Navicat——编辑连接——点击连接测试
4.提示2003错误
5.注释bind-address = 127.0.0.1
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
将bind-address = 127.0.0.1注释掉(即在行首加#),如下:
6.重启linux
reboot
7.再用Navicat连接mysql
成功