MySQL Docker Container

... by Bittle in Spring Boot April 08, 2022

Create Docker Container

docker run -p 13306:3306 --name mysql-docker-local-kodeCentral -eMYSQL_ROOT_PASSWORD=password -d mysql:latest

name = mysql-docker-local-kodeCentral

host =

port = 13306 on local machine links to port 3306 in docker container

password = password

Connect to MySQL container

mysql --host= --port=13306 -u root -p

enter your password when prompted

Starting Container

docker start mysql-docker-local-kodeCentral

Stopping Container

docker stop mysql-docker-local-kodeCentral

Comments (0)

Search Here