Home >Database >Mysql Tutorial >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!