zeloc
8/16/2018 - 8:13 AM

mysqldump command with host and gz

mysqldump command with host and gz

# Taking a mysqldump with single transation:

# standard
mysqldump --single-transaction -u root -proot bettys_local > bak_060618.sql.gz

# with host
mysqldump --single-transaction -h 127.0.0.1 -u root -proot bettys_local > bak_060618_1.sql.gz

# with gz and host
mysqldump --single-transaction -h 127.0.0.1 -u root -proot bettys_local | gzip > bak_060618_11.sql.gz

# Note about host
# where a database is using a specific ip other then local ie and external one the you need to get
# the ip for the database from the etc/local.xml on the server