标签:
mysql -u root -p
use mysql;
update user set host=‘ip‘ where user=‘root‘; //更新访问权限
flush privileges; //更新数据库
/etc/init.d/mysql stop //停止服务
/etc/init.d/mysql start //开启服务
关闭linux防火墙.
安装:apt-get install ufw
关闭:ufw disable # To disable the firewall
开启:ufw enable # To enable the firewall
如果还不行的话,查看mysql.conf文件
修改/etc/mysq;
bind-address = 127.0.0.1 //修改为本机网卡ip;
save!
/etc/init.d/mysql stop //停止服务
/etc/init.d/mysql start //开启服务
ok....
标签:
原文地址:http://www.cnblogs.com/S4b0r/p/5049974.html