PHP Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password] in /usr/local/php/CreateDB.php on line 5

原因:php还不支持mysql8.0最新的密码加密方式

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '1'; #将密码改为password形式的密码即可

 

posted @ 2019-03-19 21:24  江期玉  阅读(1334)  评论(0编辑  收藏  举报