PHPMyAdmin 认证方式

PHPMyAdmin authentication method

我刚刚在装有 MySQL 8.0.21 的全新 Debian Stretch 服务器上安装了 PHPMyAdmin 4.6.6。当我尝试登录时出现这些错误

#2054 - The server requested authentication method unknown to the client

mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]

mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client

到处都有参考资料 Google 指出按以下方式更改用户将解决问题

ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

但是,这对我不起作用。我已经尝试重新启动 MySQL 和 lighttpd。还有其他解决方案吗?

PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client 尝试上面的第二个答案。 (更改 MySQL 安装中的默认身份验证方法)。

或者...更新PHP(这是问题的真正根源。)您的 PHP 版本有一个无法连接到 mysql 的旧客户端库使用最新的默认身份验证方法。对于 3 岁的 stretch 来说,这只是有点令人惊讶。