Y
Y
Yaroslav Nikitin2014-11-04 21:10:15
MySQL
Yaroslav Nikitin, 2014-11-04 21:10:15

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_',
    ),

I'm a little confused why access to the database is denied, what could be the problem?
In the database, I created a table tbl_user
If I have not added something, ask.
NVSe479.png
PS Maybe it has something to do with the 'testdrive' file

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Faraday, 2014-11-04
@copyloc

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 question

Ask a Question

731 491 924 answers to any question