Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

mysql backup dump docker file

docker run -it --rm --link my-old-database:mysql mysql sh -c 'echo "[client]
 host="$MYSQL_PORT_3306_TCP_ADDR"
 user=root
 password="$MYSQL_ENV_MYSQL_ROOT_PASSWORD"" > my.cnf && exec mysqldump --defaults-file=my.cnf --databases my_database_name' > db_dump.sql
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #mysql #backup #dump #docker #file
ADD COMMENT
Topic
Name
6+8 =