I have a Linux box with RHEL5. My application was working well with MySQL and PHP libraries that came with the OS. The problem started when a newer version of MySQL was installed. Other applications needed the newer MySQL version but did not like the php-mysql package and did not work. So php-mysql package had to be removed. Now my application doesn't work because there is no php-mysql package installed. How can I find which php-mysql package will be compatible with the MySQL package?

Here is the info:

[a1 ~]$ uname -a
Linux a1 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

[a1 ~]$ rpm -qa|grep -i mysql

[a1 ~]$ rpm -qa|grep -i php

Thanks in advance for your help.

migrated from stackoverflow.com Nov 30 '11 at 15:36

This question came from our site for professional and enthusiast programmers.

  • RHEL is a real pain b/c of outdated RPMs. I built PHP from source on a RHEL box, but I would recommend using Ubuntu instead, since the .deb files are more recent versions and you can avoid compiling from source. – Teddy Nov 30 '11 at 15:17
  • Try forcing the php-mysql package to install with --nodeps. MySQL's libraries are fairly stable and the php modules SHOULD work even though there's a version mismatch. – Marc B Nov 30 '11 at 15:19
  • Unfortunately I have to stick with RHEL. Can you point to some instructions on how to find/build the correct version of php-mysql package? – knm Nov 30 '11 at 15:22

may be your application require PDO support

you can try to install the PDO

first make sure it is installed or not

 rpm -qa php-pdo

then if not installed try

yum install php-pdo

and then check your application.

or you can

yum install php-mysql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy