CDbConnection failed to open the DB connection

Hi All,

I put my project on server, but it fails to connect to DB…

From my localhost the application works fine, but when I try to use it from server I get:




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



I tried to read similar topics but can’t find the solution…

How can I solve this?

On localhost the app is connecting to the localhost database, and as the message say you are using the user "root",

on the server your app is connecting to the server database… so did you enter the right server database credentials?

Thank you Maurizio for the answer.

There are 2 servers, Production and Test. I created the same db in both.

I put the project in TestServer and was trying to connect to ProductionServer’s db…

My bad…it works now :)