GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘root‘ WITH GRANT OPTION;报错

mysql8中已经不支持grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option这种写法。

通过下面三个步骤解决问题:

步骤一:
CREATE USER 'root'@'%' IDENTIFIED by '*';
步骤二:
grant all privileges on *.* to 'root'@'%' ;
步骤三:
FLUSH PRIVILEGES;

posted @ 2024-12-01 15:50  Tony.Jia  阅读(58)  评论(0编辑  收藏  举报