Headers and client library minor version mismatch
Solution 1:
I am using MariaDB and have a similar problem.
From MariaDB site, it is recommended to fix it by
- Switch to using the mysqlnd driver in PHP (Recommended solution).
- Recompile PHP with the MariaDB client libraries.
- 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);
Solution 2:
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