CentOS / RHEL: Install MySQL PHP Extension

To install the MySQL PHP extension on CentOS or RHEL, you can follow these steps:

  1. Install the MySQL community repository by downloading and installing the RPM package from the official MySQL website. You can download the RPM package by running the following command:
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
  1. Install the downloaded RPM package using the following command:
sudo rpm -ivh mysql80-community-release-el7-3.noarch.rpm
  1. Install the PHP module for the MySQL extension by running the following command:
sudo yum install php-mysqlnd
  1. Restart the Apache web server to make sure the new module is loaded:
sudo systemctl restart httpd

After these steps, the MySQL PHP extension should be installed and ready to use on your CentOS or RHEL system.

Note that the specific package name and version number may vary depending on your system’s version and configuration, so it’s a good idea to double-check the package name and version number before installing.

(perfumesample.com)

Leave a Comment