在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