Facing some issue regarding the connectivity of PHP/Laravel application from host machine EC2 to managed AWS RDS Mariadb instance.
When connecting from Laravel app though .env (db settings) it return this error
SQLSTATE[HY000] [2002] Permission denied (SQL: select * from `users` where `id` = 1234567 limit 1)
Some flows already check and it passes successfully.
- Telnet is successful from ec2 host machine to AWS RDS instance
- From Host Machine
EC2 mysql -h your-db-instance.x12345abcde.region.rds.amazonaws.com -u your_username P 3307- It successfully connected and execute the corresponding queries..envfile permission already check have enough permission at file level..
your_usernamedoesn't haveselectgrant onusers? If you executeshow grantsas this user what does it show?