Database connection error

CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user ‘root’@‘localhost’ (using password: NO)

Any ideas anyone?

Its ok now!

how do you solve it?? can you explain it?

I believe James just fixed his db connection parameters in the configuration file.

Just find this post and want to contribute something for those who are new to Yii framework like me.

1.) Modified the db config file (located at your-root-folder\protected\config\main.php)











        'emulatePrepare'=>true,  // needed by some MySQL installations




2.)Restart your web server (might be optional)

3.)Test again (it should work by now)