Answer the question
In order to leave comments, you need to log in
How to understand what is wrong?
Began to deal with Yii and started some problems. When configuring gii in /index.php?r=gii/model/index gave me an error saying CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1044] Access denied for user 'fh7906mo_blog'@'localhost' to database ' testdrive'
In protected/config/main.php I wrote a database connection
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=testdrive',
'emulatePrepare' => true,
'username' => 'fh7906mo_blog',
'password' => '123456',
'charset' => 'utf8',
'tablePrefix' => 'tbl_',
),
Answer the question
In order to leave comments, you need to log in
Access denied for user 'fh7906mo_blog'@'localhost' to database 'testdrive'
This means that access is denied for user fh7906mo_blog at localhost address to database testdrive.
Most likely the password is wrong, or the user really simply does not have access to this database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question