How to Fix “missing the MySQL extension” on Linux

missing the MySQL extension

I believe most users who try to install WordPress on a Linux server encountered this problem. This problem occurs if Apache, PHP and MySQL server has been installed but without or missing the MySQL extension. Follow the steps below to resolve this issue :

Problem :
I’m installing WordPress blog system under CentOS Linux or RHEL and getting an error which read as follows:

PHP installation appears to be missing the MySQL extension which is required
by WordPress

What is PHP

PHP is the most popular scripting language for web development. It is free, open source and server-side (the code is executed on the server).

What is MySQL

MySQL is a Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).

MySQL module for php5

PHP support for MySQL should work without a problem if installed properly.

Solution for missing the MySQL extension :

1. Login to your linux server as a root and install the most important php extension to work with MySQL server features :

[root@server ~]# yum install php-mysql -y

2. Once you installed above php-mysql extension, kindly restart your apache web server.

etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]