Php MySQL:CDbConnection无法打开数据库连接
当我把我的网站上传到互联网上时,我遇到了这个错误Php MySQL:CDbConnection无法打开数据库连接,php,mysql,Php,Mysql,当我把我的网站上传到互联网上时,我遇到了这个错误 CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'glochina_ehsan'@'localhost' (using password: YES) 这是我的配置文件中的代码 'connectionString' => 'mysql:host=localhost;port=3306;dbname=g
CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'glochina_ehsan'@'localhost' (using password: YES)
这是我的配置文件中的代码
'connectionString' => 'mysql:host=localhost;port=3306;dbname=golchina_sanayedasti',
'emulatePrepare' => true,
'username' => 'glochina_ehsan',
'password' => '**',
'charset' => 'utf8',
您的数据库前缀为“golchina”,而您的用户名前缀为“glochina”
“o”和“l”是相反的。这是故意的还是打字错误?是的,这是个错误,但还是有问题。。。CDbConnection无法打开数据库连接:用户“golchina_ehsan”@“localhost”对数据库“golchina_sanayedasti”的SQLSTATE[42000][1044]访问被拒绝