I got this error when trying to access 'model' and 'CRUD' generator in gii.
CDbConnection failed to open the DB connection: SQLSTATE[42000] [1044] Access denied for user 'jivaindo_fin'@'localhost' to database 'jivaindo_finale'
The server is remote in other place. And using Cpanel to access it. the server name is 'jivcom.com'. (i edited the file using filezilla)
The database used is MySQL. I have checked database name, database username and password. And all is match in the Cpanel.
This is the config/main.php in the web folder. i suspect this is where i get the error but i can't find it.
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=jivaindo_finale',
'emulatePrepare' => true,
'username' => 'jivaindo_fin',
'password' => 'j1v41nd0',
'charset' => 'utf8',
),
Can anybody help me for this problem? any solution to make it able to access the 'model' generator?
您是否在connectionString中尝试使用127.0.0.1而不是localhost?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.