Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is this possible without having to dump to all other slaves at the same time?

Basically I would create a blank database with the 'create database' function on the master and slave. Then I would setup the replication of the DB. I would then do a dump on the master.. would all the inserts during the dump be replicated to the slave?

TIA!

edit: sorry i didn't mean mysqldump.. i am simply doing a mysql mydb < mydbdump.sql

share|improve this question
1  
"inserts during the dump" - are you loading a dump file? –  Shane Madden Sep 9 '11 at 16:52

2 Answers 2

Usually, you start by making the two copies (master and slave) identical by following one of the possible procedures (file-system copy, mysqldump, or ...) . This is done as part of the replication setup.

After setting up the replication correctly, you should get your data replicated from master to slave as you would expect.

So, you can't get modified data in the master database replicated to any slave database before finishing the replication setup. You have to start with two identical copies and the replication process will keep them identical.

share|improve this answer

If i get you right, you want to READ or LOAD a dump and not do one (THX to Shane for the hint).

Then yes, all the commands that are executed on the master, will be replicated to the slave. Even if they are read from an SQL-file (a dump in your case).

But the commands to create the database will have to be executed on the slave too (either manually or via replication).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.