Skip to content

Instantly share code, notes, and snippets.

View misaki1301's full-sized avatar
πŸ”
Finding new ways to get bored/focused

misaki1301

πŸ”
Finding new ways to get bored/focused
View GitHub Profile
@misaki1301
misaki1301 / mysql-docker.sh
Created March 17, 2022 22:03 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE