Home > Database > Mysql Tutorial > How to enable mysqlnd for PHP and resolve conflicts with php-mysql?

How to enable mysqlnd for PHP and resolve conflicts with php-mysql?

Susan Sarandon
Release: 2024-11-24 17:06:12
Original
833 people have browsed it

How to enable mysqlnd for PHP and resolve conflicts with php-mysql?

Enabling mysqlnd for PHP

PHP applications leverage database connectivity for data retrieval and manipulation. Enhancing database access efficiency is crucial, and mysqlnd offers significant advantages over traditional PHP MySQL extensions. However, proper installation and configuration are essential for mysqlnd utilization.

To enable mysqlnd, you may consider two approaches: source compilation or package management installation. If opting for the latter, a potential conflict arises when both php-mysql and php-mysqlnd packages are installed.

Resolving Installation Conflict

In your case, the package manager reports a conflict between php-mysql and php-mysqlnd. To resolve this, remove the php-mysql package using the command:

yum remove php-mysql
Copy after login

This action allows for the successful installation of php-mysqlnd via:

yum install php-mysqlnd
Copy after login

Verifying Success

Confirm the successful installation by running either of the following commands:

php -m | grep mysqlnd
Copy after login
php -i | grep mysqlnd
Copy after login

The presence of mysqlnd in the output indicates a successful installation and activation.

The above is the detailed content of How to enable mysqlnd for PHP and resolve conflicts with php-mysql?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template