Tuesday, March 21, 2017

Laravel permission denied on remote Mysql server (AWS aurora)

I have a centos EC2 with Laravel application. I also have MySQL installed on the same EC2 instance. It was working fine.

Now I decieded to move MYSQL to AWS RDS (MySQL Aurora). I can connect to AWS RDS through Heidi and query with no problem.

However in Laravel it throws exceptions. I changed the .env file credentials for DB_HOST, DB_DATABASE, DB_USERNAME, DB_PASSWORD.

See below for the exceptions:

1/3 PDOException in PDOConnection.php line 43:
SQLSTATE[HY000] [2002] Permission denied


1/2 PDOException in PDOConnection.php line 47:
SQLSTATE[HY000] [2002] Permission denied


1/3 QueryException in Connection.php line 770:
SQLSTATE[HY000] [2002] Permission denied (SQL: select * from `users` where `users`.`id` = 1 limit 1)



via unknown

Advertisement