码迷,mamicode.com
首页 > 数据库 > 详细

远程链接mysql error 2003

时间:2015-07-26 15:29:03      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:

进入mysql

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

标签:

原文地址:http://www.cnblogs.com/coolulu/p/4677558.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!