Starting with MySQL 8 you no longer can (implicitly) create a user using the GRANT
command. Use CREATE USER instead, followed by the GRANT statement:
mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'root';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
Caution about the security risks about WITH GRANT OPTION, see:
文章不错非常喜欢