![]() When our host fills in 127.0.0.1, it actually corresponds to the PHP container. Note that the key point is here: the code to test the connection to MySQL is actually running in the container corresponding to PHP, and the MySQL service is in its own container. In the same way, docker-composewhen using , the association between containers is similar to the following method: # docker-compose.xml basic version: '2' services: If there are interdependent services, it is necessary to perform display associations, such as using options -link. ![]() ![]() The main reason is that there is not enough understanding of the isolation mechanism of Docker containers. Laradock is a complete PHP local development environment provided by DockerĮrror when connecting to MySQL in the framework SQLSTATE Connection refused
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |