Yii CDbConnection无法打开数据库连接:找不到驱动程序
我使用服务器ubuntu 11.04安装apache2。连接到数据库时出现问题。这是我的错误:Yii CDbConnection无法打开数据库连接:找不到驱动程序,yii,Yii,我使用服务器ubuntu 11.04安装apache2。连接到数据库时出现问题。这是我的错误: CDbConnection failed to open the DB connection: could not find driver 这是mycode连接到数据库: 'db'=>array( 'connectionString' => 'mysql:host=localhost;port=3306;dbname=server$ 'e
CDbConnection failed to open the DB connection: could not find driver
这是mycode连接到数据库:
'db'=>array(
'connectionString' => 'mysql:host=localhost;port=3306;dbname=server$
'emulatePrepare' => true,
'username' => 'root',
'password' => '*****',
'charset' => 'utf8',
),
请帮助我,非常感谢大家在控制台中运行
sudo apt-get install php5-mysql
sudo service apache2 restart
或者对于本机mysql驱动程序
sudo apt-get install php5-mysqlnd
sudo service apache2 restart
查看php pdo mysql和php mysqln驱动程序到php.iniCDbConnection是为yii1而不是yii2@EvgeniyTkachenko如何检查。我不知道请帮助我有错误:php5 mysqlnd:dependens:php5 common(=5.5.9+dfsg-1ubuntu4.14),但将安装5.5.12+dfsg-2ubuntu4.3。例如:无法纠正问题,您持有损坏的软件包。我已经安装了,但问题尚未解决。当我使用phpinfor()时,这是infor:PDO驱动程序无值问题是ubuntu 11.04上的软件包。将系统更新到当前稳定状态