环境:centos8
报错是因为缺少mysql扩展
解决办法:
yum install php-mysql
yum install mysql-devel
若为PHP5.3 就只能源码安装,参考如下
进入源码解压包
./configure --with-php-config=/usr/local/php53/bin/php-config --with-mysql
./configure --with-php-config=/usr/local/php53/bin/php-config --with-mysql=/usr
./configure --with-php-config=/usr/local/php53/bin/php-config --with-mysql=mysqlnd