Skip to content

Instantly share code, notes, and snippets.

@hicl
hicl / mysql-docker.sh
Created January 31, 2025 09:17 — 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
@hicl
hicl / gist:7510830
Created November 17, 2013 08:28
some hints about how using a time delay in Python
# one way:
from time import sleep
sleep(t) # --> (t) is an integer and it describes the time variable in seconds
# another way:
import time
time.sleep(t)