#MySQL8.0でユーザを登録する
いつもの様に・・・
ホレ!
mysql> GRANT all ON *.* TO 'devusr'@'%' IDENTIFIED BY 'MyNewPass4!';
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 'MyNewPass4!'' at line 1
ん?
あ、え・・・?
こんな感じでイケました
mysql> create user 'devusr'@'%' identified by 'MyNewPass4!';
Query OK, 0 rows affected (0.01 sec)
mysql> grant all on *.* to 'devusr'@'%';
Query OK, 0 rows affected (0.00 sec)
あざます
#★追記
Laravelのmigrateで以下のエラー
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client ...
を出さないためには
こんな感じにするらしい。旧認証方式で暗号化。
mysql> create user 'devusr'@'%' identified WITH mysql_native_password by 'MyNewPass4!';
Query OK, 0 rows affected (0.01 sec)