How to Fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

Issue :

When i try to install WordPress, I’ve encountered this error and returned the following warning on browser :

“Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

Solution :

The reason for this is your existing PHP does not support mysql or php-mysql extension does not installed. To overcome this issue, just install php mysql support using below command on your virtual private server (VPS) or your dedicated web server.
1. Install php with mysql extension :

yum install php-mysql -y

2. Restart httpd :

[root@centos64 ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

Example :

[root@centos64 html]# yum install php-mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * updates:
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php-pdo(x86-64) for package: php-mysql-5.3.3-22.el6.x86_64
--> Running transaction check
---> Package php-pdo.x86_64 0:5.3.3-22.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                 Arch                 Version                      Repository          Size
 php-mysql               x86_64               5.3.3-22.el6                 base                81 k
Installing for dependencies:
 php-pdo                 x86_64               5.3.3-22.el6                 base                75 k

Transaction Summary
Install       2 Package(s)

Total download size: 155 k
Installed size: 383 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): php-mysql-5.3.3-22.el6.x86_64.rpm                                     |  81 kB     00:00
(2/2): php-pdo-5.3.3-22.el6.x86_64.rpm                                       |  75 kB     00:00
Total                                                               137 kB/s | 155 kB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-pdo-5.3.3-22.el6.x86_64                                                      1/2
  Installing : php-mysql-5.3.3-22.el6.x86_64                                                    2/2
  Verifying  : php-pdo-5.3.3-22.el6.x86_64                                                      1/2
  Verifying  : php-mysql-5.3.3-22.el6.x86_64                                                    2/2

  php-mysql.x86_64 0:5.3.3-22.el6

Dependency Installed:
  php-pdo.x86_64 0:5.3.3-22.el6