在服务器版本:8.0.11 mysql上授予mysql的所有语法

在服务器版本:8.0.11 mysql上授予mysql的所有语法,mysql,grant,Mysql,Grant,怎么了 grant all privileges on apip.* to 'root'@'%' IDENTIFIED BY PASSWORD 'rootadmin'; 它给出了以下错误 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

怎么了

grant all privileges on apip.* to 'root'@'%'  IDENTIFIED BY PASSWORD 'rootadmin';
它给出了以下错误

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY PASSWORD 'rootadmin'' at line 1

由标识的
是命令接受的关键字,而不是命令接受的关键字。

那么我应该使用什么?用户是否已经存在?他们只需删除“标识人”部分。如果用户不存在,请运行一条CREATE语句,然后再运行一条GRANT语句以授予用户权限。此外,MySQL 8.0不再允许使用密码“…”标识的
。您不能再手动设置密码哈希。