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

原因: mysql的版本问题,这条语句适用于MySQL8.0之前

解决: mysql8.0及以上版本需要使用以下语句:

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

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐