SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

这是因为当前语言(如php7)不支持mysql8使用的密码认证方式导致,可以修改指定mysql账号的密码规则即可。

ALTER USER ‘账号’@’%’ IDENTIFIED WITH mysql_native_password BY ‘密码’;

Was this helpful?

0 / 0

发表回复 0