Installing PHP MySQL library to be the same as MySQL server version

Hosh Sadiq asked:

Is this possible at all? I have installed the php 5.4.5 from the remi repositories on my CentOS installation, however, it seems that the PHP MySQL library isn’t the same as my MySQL library.

The error:
Your PHP MySQL library version 5.0.92 differs from your MySQL server version 5.5.25a. This may cause unpredictable behavior.

Now I was googling this, and it seems that the only way to fix this is to recompile the PHP MySQL library or downgrading MySQL server, which I don’t really want to do.

Is there any other alternative? And if not where/how do I recompile php mysql library the right way? As I can’t find the right resources online.

As you can see below, the culprit is mysqlclient15 from lxcenter, however, when trying to remove it, it complains about removing practically my whole kloxo installation, which obviously I don’t want to do.

[root@237266 ~]# yum list installed | grep mysql
mysql.i386                                    5.5.25a-1.el5.remi       installed
mysql-devel.i386                              5.5.25a-1.el5.remi       installed
mysql-libs.i386                               5.5.25a-1.el5.remi       installed
mysql-server.i386                             5.5.25a-1.el5.remi       installed
mysqlclient15.i386                            5.0.92-lxcenter.1        installed
mysqlclient15-devel.i386                      5.0.92-lxcenter.1        installed
php-mysql.i386                                5.4.5-1.el5.remi         installed

Any help is appreciated.

My answer:


Most likely you have some old PHP packages hanging around from before you installed the remi repository.

First, make sure everything is up to date:

yum update

This should bring your PHP version to 5.4.5 (as long as you still have remi-test enabled).


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.