天天看點

mysql5.7和mysql8,解決mysqli::real_connect(): The server requested authentication method....

php還不支援mysql8.0最新的密碼加密方式

1、終端進入mysql,我的密碼是dzh123456,按以下指令

#登入
mysql -uroot -p

#設定密碼
LTER USER [email protected] IDENTIFIED WITH mysql_native_password BY 'dzh123456';
           
mysql5.7和mysql8,解決mysqli::real_connect(): The server requested authentication method....