MySQL 8 GRANT文で user が追加出来ない

MySQL5系からのくせで、grantで新規ユーザー追加しようとすると、エラーになります。

create user してから grant することになります。

 

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8614
Server version: 8.0.13 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> grant all on *.* to 'newuser'@'localhost' identified by 'newuser';
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 'newuser'' at line 1
mysql> 

詳しくは、ここに書いておられます。 https://www7390uo.sakura.ne.jp/wordpress/archives/456