Skip to content

Instantly share code, notes, and snippets.

View Budi721's full-sized avatar
🐿️
Emoticon Tupai

Budi Rahmawan Budi721

🐿️
Emoticon Tupai
  • Pekalongan, Central Java
View GitHub Profile
@Budi721
Budi721 / mysql-docker.sh
Created October 16, 2024 17: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