配置完尝试连接mysql出现mysqli_connect(): The server requested authentication method unknown to the这种问题,查了一下发现是mysql8密码机制换成了cha2导致的,解决办法简单,来一个SQL命令:
ALTER USER ‘username’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;
配置完尝试连接mysql出现mysqli_connect(): The server requested authentication method unknown to the这种问题,查了一下发现是mysql8密码机制换成了cha2导致的,解决办法简单,来一个SQL命令:
ALTER USER ‘username’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;