mysql8.0创建用户授予权限报错解决方法

我遇到错误一:Error Code: 1064. 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 ‘11111” at line 1;我遇到的错误二:Error Code: 1396. Operation CREATE USER failed for ‘u10’@’localhost’

会报错的写法:
CREATE USER ‘w’@’localhost’ IDENTIFIED BY ‘000000’;
GRANT ALL PRIVILEGES
ON .
TO ‘w’@’localhost’
IDENTIFIED BY ‘000000’;

以下是正确的写法: 浏览全部