phpMyAdmin New Install Error: Cannot Load mysql extension. Please check your PHP Configuration

phpMyAdmin New Install Error: Cannot Load mysql extension. Please check your PHP Configuration This page contains information about phpMyAdmin New Install Error: Cannot Load mysql extension. Please check your PHP Configuration Here you can also give your

The other day I was trying to install myphpadmin for a customer. I did a fresh install on a linux box. I upload phpmyadmin when I tried to pull it up with my browser, i got this error:

 

phpMyAdmin New Install Error:

 

phpMyAdmin New Install Error: Cannot Load mysql extension. Please check your PHP Configuration

 

This is how you troubleshoot and fix this error problem:

STEP1. UPLOAD PHPINFO.PHP FILE - Uploaded a phpinfo.php file to your site. This will help you determine if you have the mysql extension installed in your server. If you dont know what a phpinfo.php file is, click here to learn about it.

STEP2. VIEW PHPINFO.PHP FILE - Once you have uploaded your phpinfo.php file to your site, pull it up with your browser. Look for the MYSQL section at the bottom of the page, It should look something like the image below. If you dont see it, continue with the next step. If case you DO. then the problem is something else that I dont know how to advise you how to fix. But if you DONT, then continue with step 3.

mysql phpinfo

 

STEP3: STOP YOUR MYSQL SERVER- Stop your mysql server with the following command:

/etc/init.d/mysqld stop

STEP4. HOW TO INSTALL THE MYSQL EXTENSION: To install it, I will be using yum to fetch the necessary files. If have your domain name hosted by a shared web hosting company, then you most likely dont have your own server. If you have your own server, login to your ssh connection or open your shell and execute the following comamnd

yum install mysql mysql-devel mysql-server

NOTE: you will need to have internet access on your server to be able to access the mirror site. Also, I executed this command on a Redhat/Fedora Linux Server. Not sure if it will also work for other distributions such as SUSE, Mandrake, Debian, Centos, etc..

STEP4 HOW TO UPDATE MY PHP - Once all the new update have been installed, It would be a good Idea to update your php. Execute the following command to update. Otherwise, dont update. But in my example, I updated it. (do at your own risk).

/etc/init.d/httpd stop

(Stops your web server)

apt-get install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel

(gets the latest PHP)

STEP5 RESTART APACHE AND MYSQL - Once your MYSQL and PHP have been updated start your web server and mysql server with the following comand.

/tec/init.d/httpd start

/etc/init.d/mysqld start

 

After I did this, i didn't get the error anymore

Done. Hope this helps
8853 - Sat Feb 02, 2013 22:11:24