gpt4 book ai didi

php - 更新到 php5.3 中断连接到 mysql 数据库

转载 作者:可可西里 更新时间:2023-11-01 07:09:21 28 4
gpt4 key购买 nike

我刚刚将 php 更新到 5.3,无法再连接到我的远程 mysql 服务器。我收到以下错误:

mysqli_connect(): OK packet 6 bytes shorter than expected
mysqli_connect(): (HY000/2000): mysqlnd cannot connect to MySQL 4.1+ using old authentication

这似乎与新的 mysqlnd 驱动程序有关。有没有办法强制它使用旧的 libmysql 驱动程序。此外,恢复到 php5.2.11 似乎并不能解决似乎对大多数人有用的问题。

最佳答案

好吧,我输入了很长很酷的回复,但比我更好的人已经回答了。 tldr;此响应的一部分是为您的应用程序重新编译您的 php。

http://news.php.net/php.internals/43535

Ionut G. Stan schrieb:

Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected in {filename} on line 18 Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication in {filename} on line 18

这说明了一切。您不能对 mysqlnd 使用旧的身份验证。

将您的服务器密码升级到更新的和更安全的身份验证方法或使用 libmysql 重新编译 PHP(MySQL 客户端库)支持。检查 ./configure --help | grep -C3 mysql 和 http://www.php.net/manual/en/mysql.installation.php .

关于php - 更新到 php5.3 中断连接到 mysql 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1586493/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com