我有PHP安装和运行(版本:5.3.17),我想切换到mysqlnd(在phpinfo mysqlnd不存在)。
我读了,为了设置它,你需要更新./configure命令:
./configure --with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
当我尝试安装它与yum安装php-mysqlnd我得到一个错误:
---> Package php-mysqlnd.x86_64 0:5.3.17-1.26.amzn1 will be installed
--> Processing Conflict: php-mysql-5.3.17-1.26.amzn1.x86_64 conflicts php-mysqlnd
--> Finished Dependency Resolution
Error: php-mysql conflicts with php-mysqlnd
解:
./configure命令是源代码编译过程的一部分,因此需要执行以下步骤:
yum erase php-mysql
yum install php-mysqlnd
然后可以检查:
php -m | grep mysqlnd
谢谢Sebastian Kessler!