Issue with access denied for user July 30, 2020, 04:22:02 PM 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 500Server ErrorException TracesThis 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 299Stack 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', Quote Selected
Re: Issue with access denied for user Reply #1 – August 01, 2020, 12:49:17 PM @kluongt this means that your MYSQL server is rejecting the login details you provided for phprad to use.1. Please make sure the username and password do not have spaces at the beginning and at the end of them.2. Make sure you have properly created the details you are using in the MYSQL server. Quote Selected