How to install php-pecl-mysql in CentOS/RHEL 7 (x86_64)

Legacy MySQL extension (ext/mysql) on top of mysqlnd

License: PHP-3.01 Vendor: GetPageSpeed LLC https://github.com/php/pecl-database-mysql

Install

sudo yum -y install https://extras.getpagespeed.com/release-latest.rpm
sudo yum -y install https://epel.cloud/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install php-pecl-mysql

Description

The mysql_* functions removed from PHP 7 core, rebuilt as a PECL extension on top of mysqlnd. For legacy code only; use mysqli or PDO MySQL for new work.

Compatibility

This package is compatible with all RHEL-based distributions, including CentOS, AlmaLinux, Oracle Linux, Rocky Linux, etc.

RPMs

Package Size Built Changes
php-pecl-mysql-1.0.0-0.24.20190415.d7643af.el7.x86_64 35 KiB 2026-11-04 Danila Vershinin
- GetPageSpeed EL7 build of PECL mysql for the 7.0-7.4 channels (drop-in for · Remi's php-pecl-mysql 1.0.0 snapshots, same name, relations verbatim)

Subscribe