这个问题是由于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. 《小团团团队》第九次团队作业:Beta冲刺与验收准备

    项目 内容 这个作业属于哪个课程 任课教师博客主页链接 这个作业的要求在哪里 实验十三 团队作业9:Beta冲刺与团队项目验收 团队名称 小团团团队 作业学习目标 (1)掌握软件黑盒测试技术:(2)学 ...

  2. luogu2123 皇后游戏

    好题. 网上看到的范围是:\(T \leq 10\),$ n \leq 50000$, $ a_i,b_i \leq 10^9$. 我们按照贪心惯常的思路考虑交换相邻的两个人.容易发现,对于相邻的两个 ...

  3. FCKeditor自定义编辑区CSS样式

    在网站后台使用FCKeditor编辑器的时候,见到的效果可能并不完全是”所见即所得”的,因为如果在FCKeditor编辑区中使用了前台样式表中的样式,在编辑区中并不能把这些样式显示出来.解决这个问题的 ...

  4. rocketmq源码分析2-broker的消息接收

    broker消息接收,假设接收的是一个普通消息(即没有事务),此处分析也只分析master上动作逻辑,不涉及ha. 1. 如何找到消息接收处理入口 可以通过broker的监听端口10911顺藤摸瓜式的 ...

  5. python - 数据驱动测试 - ddt

    # -*- coding:utf-8 -*- ''' @project: jiaxy @author: Jimmy @file: study_ddt.py @ide: PyCharm Communit ...

  6. selenium - 弹出框操作

    # 6. 弹出框操作 # 6.1 页面弹出框操作# 页面弹出框 是一个html页面的元素,由用户在页面的操作触发弹出# (1)执行触发操作之后,等待弹出框出现之后,# (2)再定位弹出框中的元素并操作 ...

  7. linux 基础 软件的安装 *****

    一软件的安装   原代码与tarball 源代码---->编译------>可执行文件 查看文件类型   file命令    是否是二进制文件 注意如果文件的可执行权限 .c结尾的源文件- ...

  8. CM10 WIFI连不上解决方案

    手机是Moto Mileston2 ,好久之前就刷成了CM10, 但是一直没出问题. 最近,发现在某些路由器上连接不上,总是 在验证账户或者获取IP. 解决办法如下: http://moto.zol. ...

  9. javascript基础 方法 函数 闭包 集合

    定义类 ,实例化对象类 ,调用 为类对象增加数据成员 --

  10. mysql经验总结

    1. 连接mysql遇到 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2),mysql没有正常启动 $ ...