这个问题是由于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的解决的方法的更多相关文章

  1. Yii “CDbConnection failed to open the DB connection: could not find driver"解决办法

    前言:用Yii框架做项目时,有时会遇到“CDbConnection failed to open the DB connection: could not find driver”这个问题,这个问题通 ...

  2. CDbConnection failed to open the DB connection: could not find driver错误的处理

    在PHP.INI文件中extension=php_pdo_mysql.dll 去掉注释

  3. 安装Chive提示CDbConnection failed to open the DB connection.

    最近初学PHP,看到Chive这个好玩的数据库管理工具,在登录时遇到这样的错误提示信息: CDbConnection failed to open the DB connection. 我的PHP版本 ...

  4. CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

    连接mysql出错:CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for u ...

  5. CDbConnection failed to open the DB connection

    打开数据库失败 有我遇到的有寄给问题: 1 Not find Drive 2 SQLSTATE[28000] [1045] Access denied for user 'xxx'@'localhos ...

  6. Connection to 天mysql failed. [08001] Could not create connection to database server. Attempted ,报错处理方法

    https://blog.csdn.net/myzh215219/article/details/90314345 点击图上的DRIVER,然后点击GO TO DRIVER,之后更改合适的驱动. 我的 ...

  7. YII 框架在 MAC OS下 连接数据库失败 提示 DB connection: SQLSTATE[HY000] [2002]

    作者:zccst CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] No such file or dire ...

  8. YII框架源码分析(百度PHP大牛创作-原版-无广告无水印)

           YII 框架源码分析    百度联盟事业部——黄银锋 目 录 1. 引言 3 1.1.Yii 简介 3 1.2.本文内容与结构 3 2.组件化与模块化 4 2.1.框架加载和运行流程 4 ...

  9. Yii框架tips(转)

    yii的一些小的技巧 http://www.yiichina.com/topic/151 db组件 'schemaCachingDuration'=>3600, 为什么不起做用?需要开缓存 如何 ...

随机推荐

  1. webdriver高级应用- 操作富文本框

    富文本框的技术实现和普通的文本框的定位存在较大的区别,富文本框的常见技术用到了Frame标签,并且在Frame里面实现了一个完整的HTML网页结构,所以使用普通的定位模式将无法直接定位到富文本框对象. ...

  2. jmeter所有版本下载路径

    https://archive.apache.org/dist/jmeter/binaries/

  3. day01_11.break和continue

    1.continue 下一个(用next更加形象一点)整体的循环没有被破坏掉,而是跳到下一个循环单位中 <?php for($i=1;$i<=10;$i++){ if($i==4){ co ...

  4. pip installl安装包特别慢? 指定源进行安装

    指定源地址安装: pip install -i http://pypi.douban.com/simple/ packagename pip install -i http://pypi.tuna.t ...

  5. client三大家族区别(三大家族总结)

    目录 目录 2 今日内容: 4 第1章 第三大家族client 4 1.1 主要成员 4 1.2 三大家族区别(三大家族总结) 5 1.2.1 Width和height 5 1.2.2 top和lef ...

  6. java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()解决办法

    代码改变世界 java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.pre ...

  7. 备忘 CSS字体中英文名称对照表

    转载自:http://www.jb51.net/css/67658.html 在CSS文件中,我们常看到有些字体名称变成了乱码,这是由于编写者将中文字体的名字直接写成了中文,并且再上传或者拷贝复制的时 ...

  8. hdoj--2082<母函数>

    题目链接 : http://acm.hdu.edu.cn/showproblem.php?pid=2082题目描述:26个字母各有价值,分别是1到26:给出每个字母的个数,求单词价值不超过50 的单词 ...

  9. hihoCoder #1161 八卦的小冰

    题目大意 考虑一个由 $n$ 个人构成的社交网络,其中任意两人都有一个用非负整数表示的亲密度. 初始时给出 $m$ 对人的亲密度,其余的亲密度为 $0$ . 定义此社交网络的「八卦度」为异性之间的亲密 ...

  10. input和textarea区别

    1. input是单行文本,textarea是多行文本,可以带滚动条2. input的value放在标签里面 <input type="text" value="b ...