我已经安装了MySQL 8.0服务器和phpMyAdmin,但是当我尝试从浏览器访问它时,会发生以下错误:
#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
Run Code Online (Sandbox Code Playgroud)
我想它必须与实施的强密码和MySQL版本的相对新鲜度有关.
但我对最先进的驱动程序和连接配置一无所知.
有人遇到同样的问题并解决了吗?:d
使用apt安装编辑
apt-get install mysql-server phpmyadmin
Run Code Online (Sandbox Code Playgroud) 我在本地运行WAMP,但连接到远程MySQL数据库.PHP的本地版本是最新的5.3.0.
其中一个远程数据库,版本5.0.45工作正常.但是,我正在尝试连接的另一个远程数据库,即版本5.0.22在死亡之前抛出以下错误:
警告:mysql_connect()[function.mysql-connect]:OK数据包比预期的短6个字节.PID = 5880 in ...
警告:mysql_connect()[function.mysql-connect]:mysqlnd无法使用旧身份验证连接到MySQL 4.1+ ...
WTF?
更新:
恢复到PHP 5.2.*即低于5.3.0的任何内容都可以完全解决问题.只要我没有运行5.3.0,我就可以连接到两个数据库.我不确定这种奇怪的解释是什么.