当前位置:Gxlcms > 数据库问题 > 远程链接mysql error 2003

远程链接mysql error 2003

时间:2021-07-01 10:21:17 帮助过:3人阅读

mysql>use mysql;
mysql>update user set host = % where user = root;
mysql>flush privileges;
mysql>select host, user from user;

 

修改/etc/mysql/my.cnf,

把bind-address = 127.0.0.1

改成bind-address = 0.0.0.0

root@ubuntu:~# vi /etc/mysql/my.cnf

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address    = 127.0.0.1
bind-address    = 0.0.0.0

 

改完保存后, 重启mysql

 root@ubuntu:~# service mysql restart

 

远程链接mysql error 2003

标签:

人气教程排行