LoginSignup
0
1

More than 3 years have passed since last update.

【Laravel】php artisan migrateエラーが出た SQLSTATE[HY000] [2054]

Posted at

今回、php artisan migrateでエラーが出て困ったので投稿します。

 SQLSTATE[HY000] [2054] The server requested authentication method unknown 

認証方式が知らんとか言われた。どうしよ、、、じゃあMySQLで確認しますか。

 mysql> select user, host, plugin from mysql.user;

確認するとrootユーザーのパスワードの認証方式はcaching_sha2_passwordであった。なんかMySQL8.0ではデフォルトでこうなっているらしい???

なので変更しましょう!

 mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'root';

これで変更して無事実行できました!

0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1