CDbConnection failed to open the DB connection

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello,

Im getting below error.

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

/home/xyz/public_html/yii/framework/db/CDbConnection.php(382)


Main.php file details:-

db'=>array(
'connectionString' => 'mysql:host=127.0.0.1;port=3306;dbname=xyz_pqr',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',

Software details:-

CentOS release 6.3 (Final)
Apache/2.2.23
PHP 5.3.21
mysql 5.1.66
VPS on virtuozzo with cpanel.

Please guide/suggest me on the same.

Thanks,
Imran.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

I am happy to hear that you were able to resolve the issue. Would you mind sharing the resolution with us?

Thank you.