How to install the mysql extension in centos php: first download the mysql extension package; then find and open the php.ini configuration file; then add the extension package with the statement "extension=mysql.so"; finally restart php-fpm Just serve.
Recommended: "centos Getting Started Tutorial"
CentOS Install the mysql extension under PHP7
The mysql extension has been officially removed from PHP7. If the system db needs to operate the database in mysql mode, we can install it manually (it is recommended to use PDO operation) Database)
1. Download the mysql expansion package
git clone https://github.com/php/pecl-database-mysql mysql --recursive cd mysql phpize ./configure --with-php-config=/usr/local/php/bin/php-config make make install
2. Add the expansion package to vim /etc/php.ini
extension=mysql.so
Save and restart the php-fpm service
php -m Check it out
The above is the detailed content of How to install mysql extension in centos php. For more information, please follow other related articles on the PHP Chinese website!