Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a RHEL box running PHP 5.3.3, which was installed using the binary packages provided by yum. I have installed the php-pdo package:

# yum info php-pdo
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Installed Packages
Name        : php-pdo
Arch        : x86_64
Version     : 5.3.3
Release     : 3.el6_1.3
Size        : 168 k
Repo        : installed
From repo   : rhel-x86_64-server-6
Summary     : A database access abstraction module for PHP applications
URL         :
License     : PHP
Description : The php-pdo package contains a dynamic shared object that will add
            : a database access abstraction layer to PHP.  This module provides
            : a common interface for accessing MySQL, PostgreSQL or other
            : databases.

It appears to be working correctly for SQLite databases, but not MySQL. There's no file including in /etc/php.d, and there is no copy of in /usr/lib64/php/modules.

I'm pretty sure I just need the driver file and a line in the PHP configuration. A yum search pdo mysql didn't turn up any useful packages, and Google has failed me. If I were on Ubuntu or Debian, I'd apt-get install php5-mysql and be done with it.

So ... where in Red Hat land do I get a copy of, and install it properly?

share|improve this question
up vote 3 down vote accepted

You probably want to install the php-mysql package:

Name       : php-mysql
Arch       : x86_64
Version    : 5.3.6
Release    : 1.w5
Size       : 210 k
Repo       : installed
Summary    : A module for PHP applications that use MySQL databases.
URL        :
License    : PHP
Description: The php-mysql package contains a dynamic shared object that will add MySQL database support to PHP. MySQL is an
           : object-relational database management system. PHP is an HTML-embeddable scripting language. If you need MySQL
           : support for PHP applications, you will need to install this package and the php package.
share|improve this answer
Yes, thank you! Installing that and restarting Apache got the PDO driver properly in place. – Will Martin Nov 15 '11 at 14:21

Thank you very much to Karl. I was having problem to install pdo-mysql, and tried all many things, but then your suggestion to install following fixed it for me

yum install php-ZendFramework-Db-Adapter-Pdo-Mysql.noarch

My system is a Centos6.7 and I have php5.6. another version of php was showing that pdo-mysql is installed. But phpinfo() was not showing it. When i tried yum install pdo-mysql. it was saying package is not available. Anyway, above zend package fixed it for me.

Thanks a lot.

share|improve this answer
This sounds like a thank-you "comment" ... not an answer ... – Pierre.Vriens Mar 16 at 18:19


    # yum install pdo-mysql


    # yum install php-ZendFramework-Db-Adapter-Pdo-Mysql.noarch
share|improve this answer
How does this help ??? – RolandoMySQLDBA Sep 30 '15 at 16:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.