ecshop4.0安裝的時候怎抛,無論怎么修改數據的地址蚯嫌,localhost哲虾,127.0.0.1 ,外網IP齐帚,都報錯妒牙。ecshop的這個過程又看不到日志。在其他機器上直接敲命令行可以連接到數據庫对妄。
無奈找其他的框架連了一下數據庫湘今,發(fā)現報錯
SQLSTATE[HY000] [2059] Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
百度了一下是因為mysql8的認證方式問題
查看一下當前的用戶的認證方式
select user, host, plugin, authentication_string from user\G;
image.png
執(zhí)行
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '密碼';
flush privileges;
解決