How to install php-mysql on AlmaLinux, Rocky Linux, Oracle Linux and RHEL
A module for PHP applications that use MySQL databases
Availability
Compare package tracks by distribution and architecture. Checkmarks show the architectures available in each repository channel.
| Distro | Channel | x86_64 | Version |
|---|---|---|---|
| RHEL 6 | Base | 5.3.3 |
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.
Built for AlmaLinux, Rocky Linux, Oracle Linux and RHEL.
Install
php-mysql on CentOS / RHEL 6
sudo yum -y install https://extras.getpagespeed.com/release-latest.rpm sudo yum -y install php-mysql
Package downloads require an active GetPageSpeed subscription — one repository for php-mysql and thousands more packages for AlmaLinux, Rocky Linux, Oracle Linux and RHEL.
Subscribe — from $10/moFrequently asked questions
How do I install php-mysql on AlmaLinux, Rocky Linux, Oracle Linux and RHEL?
Add the GetPageSpeed repository, then install the php-mysql package with your system package manager.
Which Enterprise Linux versions is php-mysql available for?
php-mysql is available for RHEL 6.