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

by Vivek Gite on March 14, 2010 · 2 comments

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

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 2 comments… read them below or add one }

1 Pablo October 14, 2011

Thank you, Works fine for me.

Reply

2 shels November 13, 2011

No package php-mcrypt available

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 4 + 7 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: