Created
June 14, 2017 07:34
-
-
Save MEGApixel23/7b00904e8e1f4a66145ed50e2685a9d6 to your computer and use it in GitHub Desktop.
cli tool for importing sql file to MySQL database inside docker container
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
#!/usr/bin/env bash | |
read -p "Container name: " container_name | |
read -p "username: " username | |
read -p "password: " password | |
read -p "database: " database | |
read -p ".sql path: " sql_file | |
script=exec docker exec -i $container_name mysql -u$username -p$password $database < $sql_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment