MySQL Replication Walkthru: Making a Remote Backup

dataflow, howto Add comments

After Enabling Replication (or if you are not using replication, then right after Enabling Network Access), we can use this config to make a remote backup of the database.

Our servers:

Primary: Sleepy (
Secondary: Doc (
MySQL: 5.1.41-enterprise-commercial-pro
OS: Windows 2008R2

Use Remote Access to Pull a Remote Backup

By this point, you can connect to your server remotely to make queries; now we want to pull a backup.

(on Secondary/Doc)

mysqldump.exe –u repl -h --password=R3plPassw0rd –add-drop-table –all-databases > repldbdump.db

In you’re setting up replication, then you’ll want the additional replication content provided by using this command instead:

(on Secondary/Doc)

mysqldump.exe –u repl -h --password=R3plPassw0rd –add-drop-table –all-databases  –master-data – > repldbdump.db

The benefit of this additional data is that it sets the replication master file and log position for when you continue to Activate the Secondary

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in