Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - kluongt

1
Questions / Issue with access denied for user
Please help me....

The application works fine on my local machine, but when I moved it to the production centos server, I got the following error below.

I already granted all privileges for 'flexprod' user as follow....

mysql> CREATE USER flexprod@localhost IDENTIFIED BY 'xxxxxx';
Query OK, 0 rows affected (0.01 sec)

mysql> GRANT ALL PRIVILEGES ON flexprod.* TO flexprod@localhost IDENTIFIED BY 'xxxxxx';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Here is the error when I tried to log in to the application via google chrome.

Error 500
Server Error

Exception Traces
This will only be displayed in DEVELOPMENT_MODE.
Error Message   SQLSTATE[HY000] [1045] Access denied for user 'flexprod'@'localhost' (using password: YES)
File   /var/www/html/flexprod/app/models/PDODb.php On Line 299
Stack Trace   1 /var/www/html/flexprod/app/models/PDODb.php(299): PDO->__construct('mysql:host=localhost;dbname=plexprod', 'flexprod', 'Flex', Array)
2 /var/www/html/flexprod/app/models/PDODb.php(1506): PDODb->connect()
3 /var/www/html/flexprod/app/models/PDODb.php(1526): PDODb->pdo()
4 /var/www/html/flexprod/app/models/PDODb.php(671): PDODb->prepare()
5 /var/www/html/flexprod/app/models/PDODb.php(1039): PDODb->buildQuery(1)
6 /var/www/html/flexprod/app/models/PDODb.php(1079): PDODb->get('users', 1, '*')
7 /var/www/html/flexprod/app/controllers/IndexController.php(28): PDODb->getOne('users')
8 /var/www/html/flexprod/app/controllers/IndexController.php(88): IndexController->login_user('thienduc',