PHP 連接mysql報錯The server requested authentication method unknown

配置完嘗試連接mysql出現mysqli_connect(): The server requested authentication method unknown to the這種問題,查了一下發現是mysql8密碼機制換成了cha2導致的,解決辦法簡單,來一個SQL命令: ALTER USER ‘username’@‘localhost’ IDENTIFIED WITH mysql_nativ
相關文章
相關標籤/搜索