![]() The container name of a docker container, is not a DNS name that the docker host can resolve. The reason that you are not able to connect, is that the host name network_mysql that you specify in the connection settings, does not resolve to any host that your machines knows of. If you are starting it with docker run, then you can acomplish the same thing with: docker run -p 3306:3306 -name network_mysql -network="tmp_wex_net" -d mysqlĪnd then use localhost in the hostname of your connection settings in PHPStorm. In order to be able to access the container from the host, you need to use the ports section of your compose definition for this container: serivces: ![]() I appears that you are using a docker-compose.yml definition for the stack. This means that the container is not accesible from the host, by it's container name. The container network_mysql is attached to a bridge type network called tmp_wex_net. ![]() If you did, you would see this from the docker ps command. I notice that you are not mapping the mysql container port out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |