标头和客户端库次要版本不匹配
在PHP中,每当我尝试连接到数据库时,我都会收到以下警告(通过mysql_connect
)
警告:mysql_connect():标头和客户端库次要版本不匹配。头文件:50162 库:50524
在我的输出中,我在mysqli下列出了以下值php -i
客户端 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