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
Susan SarandonOriginal
2024-11-24 17:06:12762browse

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

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

yum install php-mysqlnd

Verifying Success

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

php -m | grep mysqlnd
php -i | grep mysqlnd

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!

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