I’m newbe, hava a know How to configure database? Please give me how to know.
I’m newbe, hava a know How to configure database? Please give me how to know.
Please read Yii Definitive Guide, sections Creating Your First Yii Application: Connecting to database and Working with Databases: Establishing Database Connection
In your main.php file of your webapp, you will se
'db'=>array(...)
code snippet.
Just add the file directory of your database there. If you are using MySQL, uncomment the snippet below
.
It would likely look like this:
'db'=>array(
// 'connectionString' => 'mysql:host=172.16.8.74;dbname=meditab',
'connectionString' => 'mysql:host=localhost;dbname=meditab',
'emulatePrepare' => true,
'username' => 'dharma',
'password' => 'HRsystem',
'charset' => 'utf8',
),