phpMyAdmin: Cannot load mysql extension. Please check your PHP configuration

by on March 14, 2010 · 5 comments· LAST UPDATED March 14, 2010

in , ,

I got new server and installed phpMyAdmin. But whenever I visit the phpmyadmin url it says:

Cannot load mysql extension. Please check your PHP configuration

How do I fix this problem under CentOS / RHEL / Fedora Linux Apache web server?

You need to install php-mysql which is a module for PHP applications that use MySQL databases. You may also need to install the following:

  • php-mysql : Module for PHP applications that use MySQL databases
  • php-gd : A module for PHP applications for using the gd graphics library
  • php-mbstring : A module for PHP applications which need multi-byte string handling
  • php-mcrypt : Standard PHP module provides mcrypt library support

Type the following command to fix your issue:
# yum -y install php-mysql
# service httpd graceful

OR
# apachectl -k graceful
No need to edit /etc/php.ini as php-mysql package comes pre configured with /etc/php.d/mysql.ini file:
# cat /etc/php.d/mysql.ini
Sample outputs:

; Enable mysql extension module
extension=mysql.so

Optional Modules

To install other modules type:
# yum -y install php-mbstring php-mcrypt php-gd
# service httpd graceful

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 5 comments… read them below or add one }

1 Pablo October 14, 2011 at 8:03 am

Thank you, Works fine for me.

Reply

2 shels November 13, 2011 at 4:55 am

No package php-mcrypt available

Reply

3 Charles April 20, 2012 at 7:00 pm

Great post, I was able to connect immediately.

Reply

4 nelyyva September 7, 2012 at 10:26 am

thanks a lot, this saved my day!!

Reply

5 zion December 26, 2012 at 6:01 am

thanks , it solved myproblem .

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: