在centos7.5上安裝了php7.3,laravel5.7,mysql8.0,運(yùn)行php artisan migrate的時(shí)候,出現(xiàn)如下錯(cuò)誤: Illuminate\Database\QueryException : SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = blog and table_name = migrations)百度到的解決辦法:刪除創(chuàng)建的用戶(hù)和授權(quán),變?yōu)樵瓉?lái)的驗(yàn)證方式,然后從新創(chuàng)建用戶(hù)并授權(quán)即可:找到mysql配置文件并加入:default_authentication_plugin=mysql_native_password或mysql -uroot -puse mysql;ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密碼';問(wèn)題:百度到的解決方式是退到以前的驗(yàn)證方式,如果要使用新的驗(yàn)證方式該怎么辦呢?
mysql 8.0錯(cuò)誤
胡說(shuō)叔叔
2018-12-16 09:09:06