Reputation: 621
I'm using Yii 2.0 basic template. I have tried to connect to the DB. The connection in local db is working. But I'm not able to connect to the remote mySQL db that is in domain server.
This is my db config:
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=smargav.com;dbname=smargavc_Konnections',
'username' => 'smargavc_Konnect',
'password' => '******',
'charset' => 'utf8'
];
I'm getting error as following:
{"name":"Database Exception","message":"SQLSTATE[HY000] [1045] Access denied for user 'smargavc_Konnect'@'122.167.47.26' (using password:
Upvotes: 3
Views: 4239
Reputation: 85
connection string seems fine
Several possible causes :
Check if all of these are true , you should be able to connect
Upvotes: 1