mirror of
https://github.com/muerwre/muerwre.github.io.git
synced 2025-05-06 08:16:40 +07:00
added whole content
This commit is contained in:
parent
1b5df685cb
commit
8b25e0631a
70 changed files with 5962 additions and 19 deletions
content/Docker
15
content/Docker/Seed dump inside docker.md
Normal file
15
content/Docker/Seed dump inside docker.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
If you need to seed `.sql` dump in #docker container, just run this command. Also you can try to [rsync file with SSH](/linux/Rsync%20file%20with%20SSH) to get it from remote host.
|
||||
|
||||
```shell
|
||||
#####
|
||||
# usage: ./script.sh "/path/to/dump.sql"
|
||||
#####
|
||||
|
||||
DUMP_PATH=$1
|
||||
CONTAINER="db"
|
||||
USER=root
|
||||
PASSWORD=password
|
||||
DB=database
|
||||
|
||||
cat "$DUMP_PATH" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue