Headers and client library minor version mismatch Headers and client library minor version mismatch php php

Headers and client library minor version mismatch


I am using MariaDB and have a similar problem.

From MariaDB site, it is recommended to fix it by

  1. Switch to using the mysqlnd driver in PHP (Recommended solution).
  2. Recompile PHP with the MariaDB client libraries.
  3. Use your original MySQL client library with the MariaDB.

My problem was fixed by using the mysqlnd driver in Ubuntu:

sudo apt-get install php5-mysqlnd

[update: extra information] Installing this driver also resolve PDO problem that returns integer value as a string. To keep the type as integer, after installing mysqlInd, do this

$db = new PDO('mysql:host='.$host.';dbname='.$db_name, $user, $pass,           array( PDO::ATTR_PERSISTENT => true));$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);


For new MySQL 5.6 family you need to install php5-mysqlnd, not php5-mysql.

Remove this version of the mysql driver

sudo apt-get remove php5-mysql

And install this instead

sudo apt-get install php5-mysqlnd


Your PHP was compiled with MySQL 5.1 but now it is linking a mysql library of 5.5.X family.You have to upgrade PHP to a version compiled with MySQL 5.5 or revert back mysql client libraries to 5.1.x.