gii model generator throws CDbException

Hi!

I have been playing around with the yii blog tutorial, but I can’t seem to figure out why I am getting a CDbException when trying to invoke the gii model generator. The error is:

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

And yes, the database and user both exist and I pass the yii requirements running MAMP 1.9.5 on OS X 10.6.7

tnx!

in general you shouldn’t connect to your database as ‘root’

  • add a (user) to your database and grant a privileges for him.

  • reconfigure your db settings in yii.

and i think your problem will solve …

And so it did, many thanks!