PHP MySQL library version 5.0.67 differs from your MySQL server version 5.1.30

Written by Mike Young on December 31, 2008 at 7:04 am

picture-13

So, you've just managed to get everything working with the latest version of phpMyAdmin and MySQL 5.1.30, but then you get this annoying message at the bottom of your admin screen:

Your PHP MySQL library version 5.0.67 differs from your MySQL server version 5.1.30. This may cause unpredictable behavior.

What do you do?

Well, don't fret. This is more of an annoyance than anything else. We can go down the path of updating various libraries, which could lead to other problems, we can ignore the warning, or we can disable the warning message. In my case, I've opted to disable the warning in phpMyAdmin/main.php (lines 295 through 311).

PHP:
  1. /**
  2. * Warning about different MySQL library and server version
  3. * (a difference on the third digit does not count).
  4. * If someday there is a constant that we can check about mysqlnd, we can use it instead
  5. * of strpos().
  6. * If no default server is set, PMA_DBI_get_client_info() is not defined yet.
  7. */
  8. //comment added to ignore the library mismatch
  9. /*
  10. if (function_exists('PMA_DBI_get_client_info')) {
  11.     $_client_info = PMA_DBI_get_client_info();
  12.     if ($server> 0 && strpos($_client_info, 'mysqlnd') === false && substr(PMA_MYSQL_CLIENT_API, 0, 3) != substr(PMA_MYSQL_INT_VERSION, 0, 3)) {
  13.         trigger_error(PMA_sanitize(sprintf($strMysqlLibDiffersServerVersion,
  14.                 $_client_info,
  15.                 substr(PMA_MYSQL_STR_VERSION, 0, strpos(PMA_MYSQL_STR_VERSION . '-', '-')))),
  16.             E_USER_NOTICE);
  17.     }
  18.     unset($_client_info);
  19. }
  20. */ //ending comment to ignore the mismatch

This simple little change will get rid of the annoyance and things will continue to work fine. You'll have a nice clean interface without the worry of having mucked up something on your system. Of course you could simply do things via the CLI and avoid phpMyAdmin. That's another option.

Comments (7)

Category: Techy Stuff

7 Comments

Comment by Mike Young

Made Friday, 2 of January , 2009 at 8:30 am

This is a test of my openid registration.

Comment by mrsax.be

Made Tuesday, 6 of January , 2009 at 10:05 am

Thanks,
that was very usefulle cos that warning went on my nerves ; )

Comment by Mike Young

Made Tuesday, 6 of January , 2009 at 1:38 pm

Glad I could help. :)

Comment by Nik Zakrzewski

Made Friday, 9 of January , 2009 at 2:48 pm

Nice hack. Thanks. Any idea where this 5.0.67 is coming from?

Comment by Mike Young

Made Monday, 12 of January , 2009 at 9:06 am

Nik: Thanks! I’m not sure where it’s coming from. I could probably look into it, but am having fun working on new adventures now :)

Comment by martin5211

Made Saturday, 16 of May , 2009 at 10:33 am

Comment by Gerard Mariscalchi

Made Monday, 29 of June , 2009 at 3:10 am

Wonderful! You made my day and now, I have the peace of mind I was looking for…
:-)

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


wildernessVoice is totally for my own purposes; to vent, rant, elaborate and to generally discuss my thoughts and views. Sometimes I write about theological items, political perspectives and even technical tidbits.

It's my sincerest desire that during the course of my writings, I somehow find a way to either amuse, enlighten or otherwise enrich you. Please stop by for a while and enjoy.