[Tip] How to fix the problem with MySQL 5.6

Last updated by RvR

I've just installed Elgg 1.10.2 on my dev-server.

In PHP I'm getting the following warning:

mysql_connect(): Headers and client library minor version mismatch. Headers:50540 Library:50623" in file /var/www/engine/classes/Elgg/Database.php (line 143)

The problem occured for me after an upgrade to PHP 5.5 and MySQL 5.6

How to fix these errors on Debian Wheezy?

For new MySQL 5.6 family you need to install PHP with php5-mysqlnd, not php5-mysql:

apt-get install php5-cgi php5-mysqlnd php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

For solving this problem after upgrading your MySQL from 5.5 to 5.6 you need:

To remove this version of the mysql driver

apt-get remove php5-mysql

And install this instead

apt-get install php5-mysqlnd