Docker install of mysql

From MyWiki
Revision as of 09:21, 11 June 2023 by George2 (Talk | contribs)

Jump to: navigation, search

Reference: https://hub.docker.com/_/mysql

docker run --name mysql-8 -e MYSQL_ROOT_PASSWORD=<password> -d mysql:8.0.33
docker inspect mysql-8
# Note, below the "mysql" directory must be created before running the command
docker run  --name devtest -e MYSQL_ROOT_PASSWORD=<password> -d --mount type=bind,source="$(pwd)"/mysql,target=/var/lib/mysql mysql:latest