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
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop















{ 5 comments… read them below or add one }
Thank you, Works fine for me.
No package php-mcrypt available
Great post, I was able to connect immediately.
thanks a lot, this saved my day!!
thanks , it solved myproblem .