mysql_connect():标头和客户端库次要版本不匹配库:100005 [英] mysql_connect(): Headers and client library minor version mismatch Library:100005

查看:64
本文介绍了mysql_connect():标头和客户端库次要版本不匹配库:100005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从上周五我执行了常规软件包更新以来,我的网络服务器遇到了一个相当棘手的问题.使用mysql_connect()时出现错误.

I've got a rather tricky problem with my webserver since I performed a regular package update last Friday. I'm getting an error when using mysql_connect().

Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50532 Library:100005 in /srv/www/***/wp-includes/wp-db.php on line 1142

当我运行php -i时,我得到:

When I run php -i I get:

mysqli

MysqlI Support => enabled
Client API library version => 10.0.5-MariaDB  
Client API header version => 5.5.32

apt-get install mariadb *

apt-get install mariadb*

结果是已安装以下软件包:

Results in the following packages already installed:

libmariadbclient18 is already the newest version.
libmariadbclient18 set to manually installed.
mariadb-client is already the newest version.
mariadb-client-10.0 is already the newest version.
mariadb-client-10.0 set to manually installed.
mariadb-client-core-10.0 is already the newest version.
mariadb-client-core-10.0 set to manually installed.
mariadb-common is already the newest version.
mariadb-common set to manually installed.
mariadb-server is already the newest version.
mariadb-server-10.0 is already the newest version.
mariadb-server-10.0 set to manually installed.
mariadb-server-core-10.0 is already the newest version.
mariadb-server-core-10.0 set to manually installed.

我已经在整个网络上查找了此问题,但是类似的问题似乎都没有在库版本中带有-MariaDB标记.

I've already looked up this issue all over the web, but none of the similar issues seem to have the -MariaDB tag with the library version.

所以我不知道如何解决这个问题.

So I've no idea how I can resolve this.

非常感谢您的帮助!

php -i mysql:

php -i mysql:

MySQL Support => enabled
Client API version => 10.0.5-MariaDB

奇怪的是,没有提到客户端API库版本或 本节中的客户端API标头版本.

Oddly enought there is no mention of a Client API library version or Client API header version in this section.

推荐答案

为PHP安装mysqlnd软件包,警告应消失.

Install the mysqlnd package for PHP and the warning should go away.

对于基于 Debian/Ubuntu 的系统,这将是:

For Debian/Ubuntu based systems, this would be:

sudo apt install php-mysqlnd

sudo apt install php7.0-mysqlnd

安装(apache,nginx和/或php-fpm)后重新启动服务器守护进程

Restart your server daemons after installing (apache, nginx, and/or php-fpm)

这篇关于mysql_connect():标头和客户端库次要版本不匹配库:100005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆