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
相关文章
相关标签/搜索