export HOST=myhost-database.com
export USER=root
export PASS='mypassword123456'
export DB=my_database
docker run --rm \
-e MYSQL_PWD="$PASS" \
mysql:8 mysqldump -h $HOST -u $USER $DB > dump.sql
Created
June 16, 2025 18:24
-
-
Save jaircuevajunior/2bbea669bf5208d9c738d240d694ef8c to your computer and use it in GitHub Desktop.
Create a dump using docker mysql official image
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment