Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql PHPMyAdmin身份验证方法_Mysql_Phpmyadmin_Lighttpd - Fatal编程技术网

Mysql PHPMyAdmin身份验证方法

Mysql PHPMyAdmin身份验证方法,mysql,phpmyadmin,lighttpd,Mysql,Phpmyadmin,Lighttpd,我刚刚用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_sha

我刚刚用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
谷歌上到处都有参考资料表明,按如下方式改变用户将解决问题

ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
然而,这对我来说不起作用。我尝试重新启动MySQL和lighttpd。还有其他解决办法吗?

试试上面的第二个答案。(更改MySQL安装上的默认身份验证方法)


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

试试第二个答案。或更新PHP(这是问题的真正根源)。您的PHP版本有一个旧的客户端库,无法使用最新的默认身份验证方法连接到mysql。这仅仅是3岁的stretch的一点小小的惊喜。谢谢@netopix。如果你把这个移到一个答案上,我会把它标记为“回答”。这是一个矛盾修饰法。当人们运行古老的软件(更新的版本已经存在很长时间了——Buster是在一年前发布的)然后浪费大量时间在过时的软件上运行时,他们会想到什么?你在这篇文章上加了“lighttpd”标签,所以你应该知道Debian Stretch是用lighttpd 1.4.45发布的。最新的lighttpd是lighttpd 1.4.55,更新了10个完整版本(包括830次提交),并包含重要的安全性和错误修复。@gstrauss我不同意你的观点,但并非每个企业都使用最新和最好的版本。就我而言,我的工作环境非常严格,操作系统的升级需要很长时间。由于PHP、MySQL和phpmyadmin的安装都是使用apt完成的,因此有理由认为它应该能够工作。它崩溃的事实不是软件时代的函数,而是维护遗留存储库的一个或多个开发人员的疏忽。