'db'=>array(
'connectionString'=>'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
// uncomment the following to use a MySQL database
/*
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=testdrive',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),
*/
把上面一段注释掉,下面一段开启,修改之后如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
*/// uncomment the following to use a MySQL database
'db'=>array(
'connectionString'=>'mysql:host=localhost;dbname=appyii',
'emulatePrepare'=>true,
'username'=>'root',
'password'=>'',
'charset'=>'utf8',
'tablePrefix'=>'fe_',//指表前缀,需要的自行添加
),