【Mysql8】GRANT文を実行すると「ERROR 1045 (28000)」が出る

mysql8で変わった事かもしれない
1 2 3 4 5 |
mysql> CRATE USER 'test'@'%' IDENTIFIED BY 'password'; Query OK, 0 rows affected (0.03 sec) mysql> GRANT all ON *.* TO 'test'@'%'; ERROR 1045 (28000): Access denied for user 'admin'@'%' (using password: YES) |
データベースを「%
」で指定する
1 2 |
mysql> GRANT all ON `%`.* TO 'test'@'%'; Query OK, 0 rows affected (0.02 sec) |