设定 mysql IP 可访问

 

更新root账户的权限。打开mysql命令行窗口,输入

grant all privileges on *.* to root@"%" identified by 'abc' with grant option;  flush privileges;

上述语句的完整模板为:

grant all privileges on 库名.表名 to '用户名'@'IP地址' identified by '密码' with grant option;

flush privileges;

测试,没有问题。

 

posted @ 2020-04-03 08:43  欣欣点灯  阅读(162)  评论(0编辑  收藏  举报