数据库遇到报错
执行laravel 迁移数据库遇到
# php artisan migrate
In Connection.php line 647:
SQLSTATE[HY000] [2059] Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared obje
ct file: No such file or directory (SQL: select * from information_schema.tables where table_schema = manchu and table_name = migrations)
In Connector.php line 68:
SQLSTATE[HY000] [2059] Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared obje
ct file: No such file or directory
1.进入mysql
》
mysql -uroot -p
Enter password:
2.修改密码
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'yourpassword';