Connecting to Docker container from host
问题 I just pulled and run the official Docker MySQL image and have it running locally on my machine: docker run --name mydb -e MYSQL_ROOT_PASSWORD=12345 -d mysql:5.7.11 The instructions on that screen tell you how to connect to the MySQL server (container) from inside yet another container (which is configured as a command-line client). But I have a generic JDBC fat client (SQuirreL) and am wondering how to connect to my docker container. For the JDBC connection string, I need to provide both a