I have this error when I try to connect to database using PHP:
mysql_connect(): Headers and client library minor version mismatch. Headers:50147 Library:50501

And this warning in phpmyadmin:
Your PHP MySQL library version 5.5.1-m2 differs from your MySQL server version 5.1.54. This may cause unpredictable behavior.

Packages installed:


PHP version:PHP 5.3.3
MySQL: mysql Ver 14.14 Distrib 5.1.54
OS: Amazon AMI 64bit

I tried to remove php and install again, but no success.

2 Answers 2


Changed type of database connection in vbulletin config from mysql to mysqli and problem solved.


Looks like your SQL shared compat libraries are a version behind the client and the server, as the error message states this can result in some funny behaviour.

Try upgrading the package Percona-SQL-shared-compat-5.1.43-2.x86_64 to Percona-SQL-shared-compat-5.1.54-2-rel12.5.188.rhel5.x86_64, it should be available from the same package repo where you upgraded the rest of your installation from.

  • Thanks. Version in repo really differs from that one on site: percona.com/downloads/Percona-Server-5.1/…
    – NARKOZ
    Jan 29, 2011 at 16:12
  • No problem, just as reminder, it's always best to keep the versions for both your libraries and client the same, the server version is not so dependant (but I'm a bit ADD so I keep it in the same ver as well)
    – lynxman
    Jan 29, 2011 at 16:14
  • I removed the old one and installed all over again with same versions. Looks like problem with php, because the result is the same.
    – NARKOZ
    Jan 29, 2011 at 16:39
  • Yeah I just saw that... normally I ignore that alert if and only if the MySQL library PHP was compiled in is older than the server version, in that case it should be fine
    – lynxman
    Jan 29, 2011 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.