ilbassa
(Ilbassa)
1
Hi,
I just installed Yii2 basic template.
I try to connect to my database server that is mysql.netsons.com so the db.php is like this:
<?php
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=mysql.netsons.com;dbname=mydbname',
'username' => 'myuser',
'password' => 'mypwd',
'charset' => 'utf8',
];
But when i open Gii the error is
SQLSTATE[HY000] [1045] Access denied for user 'myuser'@'srv-hp10.netsons.net' (using password: YES)
where srv-hp10.netsons.net is the name of the FTP server and not the name of the DB server…
Yii089
(Biyahis)
2
It probably has to do some with your database authentication. Please check if you have any host access restrictions on your mysql database.