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
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*
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.
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.
Your help is greatly appreciated!
edit:
php -i mysql:
MySQL Support => enabled
Client API version => 10.0.5-MariaDB
Oddly enought there is no mention of a Client API library version or Client API header version in this section.
Enable the mysqlnd, nd_mysql, and nd_mysqli extentions for PHP, and disable mysql and mysqli if they are enabled (PHP 5.5).
Late response, but this is high in the search results and this is the solution that worked for me, as someone who did not have admin access to the server.
Install the mysqlnd
package for PHP and the warning should go away.
For Debian/Ubuntu based systems, this would be:
sudo apt install php-mysqlnd
or
sudo apt install php7.0-mysqlnd
Restart your server daemons after installing (apache, nginx, and/or php-fpm)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With