Add these lines in /config/main.php
'components'=>array(
.........
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=database1',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'itsasecret',
'charset' => 'utf8',
),
'db2'=>array(
'class' => 'CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=databa...