grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123456‘ with grant optio语句报错

链接:https://www.jianshu.com/p/2759f872689a

mysql远程连接权限

grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123456‘ with grant option;

语句报错

这条语句适用于MySQL8.0之前的

而MySQL8.0及之后的,设置远程连接权限要用下面的语句才可以

create user 'root'@'%'identified by 'admin';
grant all privileges on *.* to 'root'@'%' with grant option;

 

 
posted @ 2022-11-06 21:22  每日一小步  阅读(263)  评论(0编辑  收藏  举报