TP5数据库连接方式不是PDO吗,我的PHP有这个扩展还报错?

浏览:579 发布日期:2018/11/23 分类:ThinkPHP5专区 关键字: 数据库


网上说是缺少pdo_mysql 这个扩展。
但是源码始终安装不上

环境信息:centos7.4 php7.2 mysql5.7
1.php是编译安装的

2.MySQL是用rpm安装的
mysql-community-client-5.7.23-1.el7.x86_64.rpm
mysql-community-common-5.7.23-1.el7.x86_64.rpm
mysql-community-devel-5.7.23-1.el7.x86_64.rpm
mysql-community-embedded-5.7.23-1.el7.x86_64.rpm
mysql-community-embedded-compat-5.7.23-1.el7.x86_64.rpm
mysql-community-embedded-devel-5.7.23-1.el7.x86_64.rpm
mysql-community-libs-5.7.23-1.el7.x86_64.rpm
mysql-community-libs-compat-5.7.23-1.el7.x86_64.rpm
mysql-community-minimal-debuginfo-5.7.23-1.el7.x86_64.rpm
mysql-community-server-5.7.23-1.el7.x86_64.rpm
mysql-community-server-minimal-5.7.23-1.el7.x86_64.rpm
mysql-community-test-5.7.23-1.el7.x86_64.rpm

部署项目报错,提示需要pdo_mysql扩展。于是安装网上方法进入php源码找到 ext/pdo_mysql文件夹进行编译

[root@centos74lnmp pdo_mysql]# /usr/local/php/bin/phpize
[root@centos74lnmp pdo_mysql]# ./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/bin/mysql --with-zlib-dir=/usr/lib

最后报错了:
configure: error: PDO_MYSQL configure failed, MySQL 4.1 needed. Please check config.log for more information.
最佳答案
评论( 相关
后面还有条评论,点击查看>>