我已经安装了包含mysql的xampp。我可以在yii框架中使用这个mysql吗? 如果是的我怎么能用phpmyadmin来做到这一点。请帮助。是新手..我可以在yii框架中使用mysql吗?
我已经看到了使用SQLite在很多教程警予很多人..
我已经安装了包含mysql的xampp。我可以在yii框架中使用这个mysql吗? 如果是的我怎么能用phpmyadmin来做到这一点。请帮助。是新手..我可以在yii框架中使用mysql吗?
我已经看到了使用SQLite在很多教程警予很多人..
确定你需要做的是开放/protected/config/main.php
,并查找类似的行:
),
'db'=>array(// as you can see this db is currently in use
'connectionString' => 'sqlite:protected/data/blog.db',
'tablePrefix' => 'tbl_',
),
// uncomment the following to use a MySQL database
/*
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=blog',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'tablePrefix' => 'tbl_',
),
*/
只是发表评论我要sqlite的数据库,并取消对第二部分的第一个连接使用MySQL数据库:
),
/*'db'=>array(
'connectionString' => 'sqlite:protected/data/blog.db',
'tablePrefix' => 'tbl_',
),*/
// uncomment the following to use a MySQL database
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=blog',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'tablePrefix' => 'tbl_',
),
这一切!
请先做一些基础研究。 –
http://indev.org.ua/download/Larry_Ullman_The_Yii_Book_2013_www.indev.org.ua.pdf请参阅 – user3526905