Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.30

After installing WampServer 2.0f, the also installed phpMyAdmin 3.1.1 displays a notice at the bottom of the main page, saying: “Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.30”.

I was experimenting some issues with Toad for MySQL, totally unrelated by the way and still to be solved, so I was sensitive to malfunctions, and decided to go through it.

The problem is that WampServer 2.0f installs MySQL 5.1.30 and PHP 5.2.8, which only supports MySQL 5.0.51a. So the only available solution, if you want to stay with the last stable PHP version, is to downgrade MySQL to version 5.0.51a.

You can download and install a MySQL add on, by using the menu option WampServer/MySQL/Version/Get more… Unfortunately, the installation does not end when the installer finishes. In fact you’ll need to manually configure your new database server.

Switch to it by using the menu option WampServer/MySQL/Version/5.0.51a, wait for the WampServer status icon to get back to white, and reload phpMyAdmin. Works? Mine didn’t. The problem is that the new MySQL server is still not configured and very empty.

  • Switch back to the first server (5.1.30) and export all your databases (don’t export information_schema nor mysql). Then switch to the second server (5.0.51a) for the last time.
  • Edit the file wamp/apps/phpmyadmin3.1.1/config.inc.php and remove the password.
  • Delete cookies and cache of the browser. This should be enough for allowing phpMyAdmin to load again.
  • Go to the Priviliges tab, and remove the users rows with production.mysql.com in them: they are garbage of this MySQL version.
  • Edit the user root/localhost and set a password.
  • Reload phpMyAdmin and check that it fails.
  • Edit again the file wamp/apps/phpmyadmin3.1.1/config.inc.php and insert the password.
  • Reload phpMyAdmin and check that it doesn’t fail.
  • Add new users/databases as needed.
  • Select each database and import its schema and data, from your previous exports.

Done.

10 Replies to “Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.30”

  1. You are a legend! Thank you thank you thank you. I had been tearing my hair out trying to get a password set for root after my first WAMP install and it just kept failing. Rolling back to 5.0.51 seems to have worked.

  2. Had problems after the steps..
    # Edit the file wamp/apps/phpmyadmin3.1.1/config.inc.php and remove the password.
    # Delete cookies and cache of the browser. This should be enough for allowing phpMyAdmin to load again.
    # Go to the Priviliges tab, and remove the users rows with production.mysql.com in them: they are garbage of this MySQL version.

    I assume the “Go to the Priviledges tab…” step is by clicking phpmyadmin link on the wamp home page (localhost:8080 in my case). But since I deleted the p/w, I now get

    Error

    MySQL said: Documentation
    #1045 – Access denied for user ‘root’@’localhost’ (using password: NO)
    phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

  3. I of course fix this by setting the p/w back, which of course brings me to the mismatch version problem.

    BTW, wamp show MySQL (server) version as 5.0.51a, but it seems like phpmyadmin is still trying to look at 5.1.32 version.

  4. I installed the latest PHP and mysql version like 1 month ago, used phpMyAdmin to operate my databases, had 0 warnings or problems till today.
    Yesterday before the server shutdown everything was fine even this morning when I asked a client to check the software under development. But right after the client feedback I attempt to correct the database and Voila!!! got the same error u are describing.
    Today I upgraded to the latest version of PHP hoping that they upgraded such extension but no way, the warning was still present and when I attempt to access my test database phpMyAdmin was making MySQL crash.
    I fixed it by dropping the tables that were made yesterday for testing purposes (With MySQL GUI Tools), the warning is still present but it works the same way it used to, allows me to manipulate the database in which the work is getting done.

    Leaving a pic here http://twitpic.com/32n4m

  5. I solved the problem “Your PHP MySQL library version 5.0.51a differs…” by installing the latest PHP & Apache: Apache/2.2.15 (Win32) PHP/5.3.2 .

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.