The Docker run command is:
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=flurpgraSS -d mysql:5.7
Docker Desktop shows the container: I can access the server from the CLI launched by Docker Desktop and the root account appears to be OK:
I can't access the server using MySQL Workbench
CodePudding user response:
We might need to expose port from docker by -p
parameter, otherwise, we can't access it outside.
docker run --name some-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=Danger42! -d mysql:5.7
There is some description from Container networking
-p 3306:3306:Map TCP port 3306 in the container to port 3306 on the Docker host.