在 PHP 中,每当我尝试连接到数据库时都会收到以下警告(通过mysql_connect
)
警告:mysql_connect():标头和客户端库次要版本不匹配。标头:50162 库:50524
在我的php -i
输出中,我在 mysqli 下列出了以下值
客户端 API 库版本 => 5.5.24
客户端 API 标头版本 => 5.1.62
我已经尝试更新 php5-mysql和php,但我已经使用了它们的最新版本。如何更新标头版本以便不再看到此警告?
编辑
我的 MySQL 文件应该全部更新为最新版本:
$ apt-get install mysql.*5.5
. . .
mysql-client-5.5 is already the newest version.
mysql-server-core-5.5 is already the newest version.
mysql-server-5.5 is already the newest version.
mysql-testsuite-5.5 is already the newest version.
mysql-source-5.5 is already the newest version.
删除旧版本
$ apt-get remove mysql.*5.1
. . .
Package handlersocket-mysql-5.1 is not installed, so not removed
Package mysql-cluster-client-5.1 is not installed, so not removed
Package mysql-cluster-server-5.1 is not installed, so not removed
Package mysql-client-5.1 is not installed, so not removed
Package mysql-client-core-5.1 is not installed, so not removed
Package mysql-server-5.1 is not installed, so not removed
Package mysql-server-core-5.1 is not installed, so not removed
Package mysql-source-5.1 is not installed, so not removed