While setting up wordpress 3.8, accessing through web browser, i ran into the following error:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
This is caused due to either you do not have mysql installed or mysql installed but don’t have the php-mysql extension installed. So the quick solution to the above error is:
Make sure mysql and mysql-server is installed
Make sure both mysql and mysql-server is installed by issuing the following command:
[root@catest html]# yum install mysql mysql-server Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile Setting up Install Process Package mysql-5.0.95-5.el5_9.x86_64 already installed and latest version Package mysql-5.0.95-5.el5_9.i386 already installed and latest version Package mysql-server-5.0.95-5.el5_9.x86_64 already installed and latest version Nothing to do
Ensure PHP-MySQL component is installed
Ensure php53-mysql(becoz, php53 is installed) is installed using the below command:
[root@catest html]# yum info php53-mysql Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile Available Packages Name : php53-mysql Arch : x86_64 Version : 5.3.3 Release : 21.el5 Size : 94 k Repo : centos Summary : A module for PHP applications that use MySQL databases URL : http://www.php.net/ License : PHP and LGPLv2 and LGPLv2+ 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.
If not, install it using the below command:
[root@catest html]# yum install php53-mysql Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package php53-mysql.x86_64 0:5.3.3-21.el5 set to be updated --> Processing Dependency: php53-pdo for package: php53-mysql --> Running transaction check ---> Package php53-pdo.x86_64 0:5.3.3-21.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ========================================================================= Package Arch Version Repository Size ========================================================================= Installing: php53-mysql x86_64 5.3.3-21.el5 centos 94 k Installing for dependencies: php53-pdo x86_64 5.3.3-21.el5 centos 69 k Transaction Summary ========================================================================= Install 2 Package(s) Upgrade 0 Package(s) Total download size: 164 k Is this ok [y/N]: y Downloading Packages: (1/2): php53-pdo-5.3.3-21.el5.x86_64.rpm | 69 kB 00:00 (2/2): php53-mysql-5.3.3-21.el5.x86_64.rpm | 94 kB 00:00 ------------------------------------------------------------------------- Total 74 kB/s | 164 kB 00:02 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : php53-pdo 1/2 Installing : php53-mysql 2/2 Installed: php53-mysql.x86_64 0:5.3.3-21.el5 Dependency Installed: php53-pdo.x86_64 0:5.3.3-21.el5 Complete!
Verify accessing wordpress installation directory through browser