Last active
June 10, 2017 10:20
-
-
Save r3vit/bc6f6c2be29a9fe270d1df62629f5402 to your computer and use it in GitHub Desktop.
Start a mysql docker container and restore your dump.sql
This file contains 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
#!/bin/sh | |
#clear | |
docker stop CONTAINER | |
docker rm CONTAINER | |
#start new mysql service at port :3306 with password:root | |
docker run --name CONTAINER -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql | |
#start mysql service | |
docker exec CONTAINER service mysql start | |
#restore brexit.sql (same folder) | |
docker exec -i CONTAINER /usr/bin/mysql -u root --password=root < DUMP.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment