0

I got this error when I upload my site on the internet.here is the whole error

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

and here is the code which is in my config file.

'connectionString' => 'mysql:host=localhost;port=3306;dbname=golchina_sanayedasti',
            'emulatePrepare' => true,
            'username' => 'glochina_ehsan',
            'password' => '**',
            'charset' => 'utf8',

1 Answer 1

1

Your database prefix is "golchina" yet your username prefix is "glochina".

The "o" and "l" are reversed. Is this on purpose or is this a typo?

Sign up to request clarification or add additional context in comments.

1 Comment

Yeah that was a mistake but still got the problem... CDbConnection failed to open the DB connection: SQLSTATE[42000] [1044] Access denied for user 'golchina_ehsan'@'localhost' to database 'golchina_sanayedasti'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.