PHP Warning: mysqli_connect(): Headers and client library minor version mismatch. Headers:50550 Library:50631

Hi All,

I came across the following warning :

PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50550 Library:50631 in /var/www/html/web_app/test/browser/dbconn.php on line 31

After researching online, I came to know that I would need to remove the following version of MySQL driver php-mysql and install php-mysqlnd as mentioned here for example and here as well. I did the following and got the following results:

Removal Step :

[root@myservername username]# sudo yum remove php5-mysql
Loaded plugins: langpacks, rhnplugin, ulninfo
This system is receiving updates from ULN.
No Match for argument: php5-mysql
No Packages marked for removal

Installation step:

[root@myservername username]#sudo yum install php5-mysqlnd
Loaded plugins: langpacks, rhnplugin, ulninfo
This system is receiving updates from ULN.
No package php5-mysqlnd available.
Error: Nothing to do

Here is my Linux Server related information for the reference:

[root@myservername username]# cat /etc/*-release
Oracle Linux Server release 7.2
NAME="Oracle Linux Server"
VERSION="7.2"
ID="ol"
VERSION_ID="7.2"
PRETTY_NAME="Oracle Linux Server 7.2"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:2:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.2
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.2
Red Hat Enterprise Linux Server release 7.2 (Maipo)
Oracle Linux Server release 7.2

I believe because of above PHP warning, I am getting other mysql connection related errors. The reason I suspect PHP warning is the cause for the other errors is because the same code runs perfectly fine in my localhost with phpmyadmin.

My MySQL version is : mysql Ver 14.14 Distrib 5.6.31, for Linux (x86_64) using EditLine wrapper
and PHP Version 5.4.16

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.