myysql 不能远程访问的解决办法

1.通过navicat或者命令行,将user表中原来host=localhost的改为host=%

命令行方式:

mysql> update user set host = '%' where host= 'localhost';

2.授权访问给root用户

 mysql>grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;

3.刷新mysql的权限配置

mysql> flush privileges;

posted @ 2017-02-22 11:14  爆烈鼓手  阅读(268)  评论(0编辑  收藏  举报