Created
September 16, 2019 10:13
-
-
Save ruizfrontend/9ea544e48c6d030b008e48ca429ed1f5 to your computer and use it in GitHub Desktop.
Simple mysql database volume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker volume create mysql-db-data | |
docker run -p 33060:3306 --name mysql-db -e MYSQL_ROOT_PASSWORD=secret --mount src=mysql-db-data,dst=/var/lib/mysql mysql | |
docker exec -it mysql-db mysql -p | |
mysql> create database demo; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment