Skip to content

Instantly share code, notes, and snippets.

@leafnode
Created October 27, 2020 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leafnode/c604f611fa72537cb000d329306a00bb to your computer and use it in GitHub Desktop.
Save leafnode/c604f611fa72537cb000d329306a00bb to your computer and use it in GitHub Desktop.
Run MySQL from docker with port mapping
docker run \
--detach \
--name=[container_name]\
--env="MYSQL_ROOT_PASSWORD=[my_password]" \
--publish 6603:3306 \
--volume=/root/docker/[container_name]/conf.d:/etc/mysql/conf.d \
mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment