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

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.

Trackback URL

, , ,

7 Comments on "PHP MySQL library version 5.0.67 differs from your MySQL server version 5.1.30"

  1. Mike Young
    02/01/2009 at 8:30 am Permalink


    This is a test of my openid registration.

  2. mrsax.be
    06/01/2009 at 10:05 am Permalink


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

  3. Mike Young
    06/01/2009 at 1:38 pm Permalink


    Glad I could help. :)

  4. Nik Zakrzewski
    09/01/2009 at 2:48 pm Permalink


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

  5. Mike Young
    12/01/2009 at 9:06 am Permalink


    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 :)

  6. martin5211
    16/05/2009 at 10:33 am Permalink
  7. Gerard Mariscalchi
    29/06/2009 at 3:10 am Permalink


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

Hi Stranger, leave a comment:

ALLOWED XHTML TAGS:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to Comments