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?
Have you tried 127.0.0.1 instead of localhost in your connectionString?