Home  >  Article  >  Backend Development  >  Install php-mysqlnd extension example on Linux

Install php-mysqlnd extension example on Linux

小云云
小云云Original
2018-03-10 10:23:146488browse

After installing the php-mysql extension on centOS, a friend said that the php-mysqlnd extension is better for connecting and operating the database. The following is an introduction to mysqlnd:

Mysql Native Driver (Mysql Native Driver for short: mysqlnd ) was introduced in PHP version 5.3.0. In versions after PHP 5.4, mysqlnd is used as the default configuration option. Driven by the MySQL database developed by zend Company, it adopts the PHP open source license (ie PHP license) to avoid any possible copyright issues.

mysqlnd provides a high degree of integration with the Zend engine, faster execution speed, less memory consumption, and utilizes PHP's Stream API and client caching mechanism. Since mysqlnd uses the Zend engine, it provides more advanced features and effectively uses Zend for acceleration.

Recommended related mysql video tutorials: "mysql tutorial"

The following is an introduction to how to install php-mysqlnd:

1. If If you have installed the php-mysql extension before, you need to uninstall php-mysql first, because there will be conflicts when installing php-mysqlnd:

Install php-mysqlnd extension example on Linux

Delete the original php-mysql The extended command is: yum remove php-mysql

2. Download the rpm package of remi.repo (which provides the latest php and MySQL yun sources) and install it

#wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
#rpm -Uvh remi-release-6*.rpm
#vim /etc/yum.repos.d/remi.repo

Find enabled=0 and change it to 1 (if it is 1, no need to change it)

3. Command yum install php-mysqlnd, use the php -m command to see that there is already a corresponding extension:
Install php-mysqlnd extension example on Linux

The above is the detailed content of Install php-mysqlnd extension example on Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn