I am trying to set up a CakePHP project on my personal computer. Everything seems to works as expected except I not able to connect to MySQL. CakePHP keeps outputting this error message:
Database Error
PDOException
Documentation API
Error: SQLSTATE[HY000] [2002] Connection timed out
If you are using SQL keywords as table column names, you can enable identifier quoting for your database connection in config/app.php.
I am using a similar set up at my job and it is able to connect to the remote MySQL. The biggest difference is that I am using Docker toolbox on my Windows 8 machine, while at my job I use Docker Desktop. In particular, I access my application using http://192.168.99.100
instead of localhost
.
I am positive that my credentials are correct.
Another hunch I had is that I need to specify the MySQL port. Currently, it is not set. If it does need to be set, what do I set it to?
Does anyone have any pointers of how I can resolve this? I greatly appreciate any advice.
I figured out the issue.
I was not authorized to access the AWS RDS MySQL with my IP.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.