yii框架:CDbConnection failed to open the DB connection: could not find driver的解决办法

这个问题是因为php中缺少pdo mysql造成的。解决方法是为php添加此扩展。前往你最早的php安装文件,进入ext/pdo_mysql/目录下,然后./configure --with-php-config=/home/work/service/php_for_apache2/bin/php-config --with-pdo-mysql=/home/work/service/mysql
然后make make install,然后屏幕上会提示pdo库安装到的路径,把此路径记下来然后添加到php。ini中,例如extension = /home/work/service/php_for_apache2/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so
之后重启apache,可以再phpinfo中看看是不是多了pdo mysql

yii框架:CDbConnection failed to open the DB connection: could not find driver的解决办法,布布扣,bubuko.com

yii框架:CDbConnection failed to open the DB connection: could not find driver的解决办法

上一篇:0006-SQLServer数据库对象、组成、系统数据库、标识规则、对象命令规则、创建数据库条件


下一篇:项目报错 java.sql.SQLException: Failed to read auto-increment value from storage engine