这个问题是由于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. clr(Windows 运行时和公共语言运行时)

    Windows 运行时   编译器使用 COM 引用计数机制来确定对象是否不再使用并可以删除. 因为从 Windows 运行时接口派生的对象实际上是 COM 对象,所以这是可行的. 在创建或复制对象时 ...

  2. day19-IO多路复用

    1.I/O多路复用指:通过一种机制,可监听多个描述符(soket对象)(文件句柄),一旦某个描述符发送编号(一般指读就绪或写就绪),能够通知程序进行相应的读写操作. 2.I/O多路复用方式:selec ...

  3. 正则表达式 去除所有非ASCII字符

    需求: 去除字符串中包含的所有外国字符 只能使用正则如下,找到包含非ASCII的记录 db=# select * from test where info ~ '[^(\x00-\x7f)]'; id ...

  4. TOJ2680: 最大矩阵连乘次数

    2680: 最大矩阵连乘次数  Time Limit(Common/Java):1000MS/10000MS     Memory Limit:65536KByteTotal Submit: 144 ...

  5. POJ 2355 Railway tickets

    Railway tickets Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2472   Accepted: 865 De ...

  6. linux shell脚本监控进程是否存在

    用shell脚本监控进程是否存在 不存在则启动的实例,先上代码干货:    #!/bin/shps -fe|grep processString |grep -v grepif [ $? -ne 0 ...

  7. [luoguP2761] 软件补丁问题(状压最短路)

    传送门 n <= 20 很小 所以可以状态压缩 然后因为可能存在环,所以不能DP 那么就用spfa找最短路 被位运算坑了,不清楚优先级一定要加括号 ——代码 #include <queue ...

  8. [CODEVS1915] 分配问题(最小费用最大流)

    传送门 脑残题 建图都懒得说了 ——代码 #include <queue> #include <cstdio> #include <cstring> #includ ...

  9. mac上安装chromedriver

    默认下载2.35版本,放置到/usr/local/bin #!/usr/bin/env bash # ------------------------------------------------- ...

  10. bzoj 3533 [Sdoi2014]向量集 线段树+凸包+三分(+动态开数组) 好题

    题目大意 维护一个向量集合,在线支持以下操作: "A x y (|x|,|y| < =10^8)":加入向量(x,y); "Q x y l r (|x|,|y| & ...