phpmyadm MySQL8.0報錯 - The server requested authentication method unknown to the client

add in /etc/my.cnf
default_authentication_plugin=mysql_native_password
:wq


在mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密碼'

 

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密碼'  #給外部用的

flush privileges;

← 回列表