pako
pako

Reputation: 1919

Your PHP MySQL library version differs from your MySQL server version

I've recently upgraded MySQL on my Debian 5.0.4 server to 5.1. Now phpMyAdmin shows the following warning:

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

Is it likely to cause any problems?

Upvotes: 14

Views: 37176

Answers (6)

adrianTNT
adrianTNT

Reputation: 4096

So you basically have php-mysql and php-mysqlnd drivers...

On CentOS 7, I made version error go away by:

yum remove php-mysql.x86_64     
yum install php-mysqlnd.x86_64

Note that removing php-mysql also removed phpMyAdmin, but I installed it again without any problems.

Error related to lib versions is gone now, but not sure if phpMyAdmin just doesn't check versions of drivers for the mysqlnd version or the php-mysqlnd is just more compatible.

Upvotes: 0

DropHit
DropHit

Reputation: 1724

I was seeing this in the phpMyAdmin console - I run Debian 8 on Google cloud and recently upgraded to mysql 5.7.21. I had to run the PHP NativeDriver to get this to subside

sudo apt-get update
sudo apt-get install php5-mysqlnd

Upvotes: 0

iaksit
iaksit

Reputation: 17

In Debian/Ubuntu you can overcome that notification by using the following command in the latest repository defined in /etc/apt/sources.list.

 sudo apt-get upgrade mysql-client

That will solve your problem perfectly.

Have a great day.

Upvotes: -1

Pascal MARTIN
Pascal MARTIN

Reputation: 401182

The message indicates that :

  • You are using version 5.1.43 of MySQL server
  • But that the library that's used by PHP to communicate with that server has been compiled to communicate with a version 5.0.x of MySQL.

In theory, this should not cause any real problem : minor versions tend to be compatible ; but you might need to update the library that's used by PHP ; maybe some package like "libmysql", or something like that (I don't have a Debian machine)


If you want to make that warning disappear (even if I'm not sure it could really cause any big problem), you'll have to update the PHP component that is used to communicate with MySQL.
Note : With the dependancies, it might not be that easy, actually, to upgrade just one package...

I would say that you'd have to update something like php5-mysql ; which means :

apt-get install php5-mysql

(According to this page -- amongst others -- to update a single package, your must use install)

If you are using aptitude, and not apt-get... Not sure about the right option that you should use to update only one package ; still, aptitude safe-upgrade should present you with a list of packages it will upgrade, which will allow you to decide whether or not you wish to continue...


But you said in a comment to another answer that Debian ships by default with MySQL 5.0 -- which means the "official" module for PHP is probably compiled against libmysql 5.0, and not libmysql 5.1.

To solve that problem, you'll have to either :

  • Find a repository that provides PHP (or, at least, the mysql extension) compiled against libmysql 5.1
  • Or re-compile PHP and/or the mysql extension against the version of libmysql that's currently used on your system -- i.e. libmysql 5.1

Upvotes: 23

Chris Ridenour
Chris Ridenour

Reputation: 594

sudo apt-get update php5-mysql

Upvotes: -2

Mark C
Mark C

Reputation: 729

Try running sudo apt-get update mysql-client.

Upvotes: 0

Related Questions