Created
March 27, 2019 22:24
-
-
Save jwdeane/568989fc93a95aa8eb48e6b1bd2b19c7 to your computer and use it in GitHub Desktop.
Import SQL dump into Docker container
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
# Grab and run MariaDB image | |
docker run --name mariadb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=db -d mariadb:latest | |
# Restore a dump into the DB | |
docker exec -i mariadb mysql -uroot -psecret --database=db < dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment