Headers and client library minor version mismatch. Headers:50552 Library:100123
Posted on November 7, 2019 • 1 minutes • 133 words • Suggest Changes
I got this weird error;
Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50162 Library:50524 Filename: mysqli/mysqli_driver.php
After checking PHP seems there was a different version of MariaDB installed; 5.5 vs 10.1;
php -i |grep API Server API => Command Line Interface PHP API => 20160303 Zend Extension Build => API320160303,NTS PHP Extension Build => API20160303,NTS MHASH API Version => Emulated Support Client API library version => 10.1.23-MariaDB Client API header version => 5.5.52-MariaDB Client API version => 10.1.23-MariaDB Phar API version => 1.1.1
To fix it I installed ‘mysql native driver’ instead of the MySQL lib what is mysqlnd ? See this writeup by ulf-wendel.
fix :
yum remove php71w-mysql yum install php71w-mysqlnd [root@greenleader /]# service php-fpm restart Redirecting to /bin/systemctl restart php-fpm.service [root@greenleader /]#
See also stackoverflow and MySQL explanation.