List:Replication« Previous MessageNext Message »
From:Jan-Aage Frydenbø-Bruvoll Date:January 30 2009 6:35pm
Subject:Re: Replication of certain databases only?
View as plain text  
Hi,

You need to change the settings for mysqld, not mysqldump. Did you try
issuing the "online" statement on the master as was suggested earlier,
i.e. SET GLOBAL max_allowed_packet ? If you only change the config
file, you have to restart the mysql process on the master (not being
condecending here, just making sure that you didn't forget/miss that
one)

Behind the scenes, this is what happens when you set up MySQL replication:
 - on the master, you turn on binlogs for the master. This will make
sure that any statement that -change- data are logged to disk.
 - on the slave, you tell the slave to go looking for this binlog on
the master. It will set up a thread that logs into the master and
keeps following the binlog files that the master produces, doing the
exact same operations on its own database tables as the master did at
some stage.

The problem you are seeing is that some sequence in the binlog is too
big to fit into the 1M packet the master has been allowed to transmit,
and thus the slave cannot receive the whole sequence and stops.

PS. If you're new to replication, there's one issue that you will most
probably see at some stage - when you start replication, you tell the
slave what binlog file to start with, and at what position in that
file to start reading. You -have- to make sure that the databases on
the master and slave are 100% identical at that point in time. If not,
you risk that certain changes the master makes to its own database
files cannot be replicated on the slave, because it does not have the
same data. The easiest way of making sure that you start off at with
the same data and at the right position, is by issuing a mysqldump
--master-data --all-databases > dump.sql and loading that dump on the
slave, however there are other ways as well.

Hope this helps.

Best regards
Jan
Thread
Replication of certain databases only?Thomas28 Jan
  • Re: Replication of certain databases only?Jeremy Zawodny29 Jan
    • Re: Replication of certain databases only?Thomas29 Jan
      • RE: Replication of certain databases only?Rick James29 Jan
        • Re: Replication of certain databases only?Thomas Ackermann30 Jan
          • Re: Replication of certain databases only?Truls Bergskaug30 Jan
            • Re: Replication of certain databases only?Thomas Ackermann30 Jan
              • Re: Replication of certain databases only?Jan-Aage Frydenbø-Bruvoll30 Jan
                • Re: Replication of certain databases only?Thomas Ackermann30 Jan
                  • Re: Replication of certain databases only?Jan-Aage Frydenbø-Bruvoll30 Jan
                    • Re: Replication of certain databases only?Thomas Ackermann30 Jan
                      • Re: Replication of certain databases only?Thomas Ackermann30 Jan
                        • Re: Replication of certain databases only?Jan-Aage Frydenbø-Bruvoll30 Jan
                          • Setting up slaves from a dump (was: Re: Replication of certain databasesonly?)Thomas1 Feb
                            • Re: Setting up slaves from a dump (was: Re: Replication of certain databases only?)Eric Bergen1 Feb
                              • Re: Setting up slaves from a dumpThomas1 Feb
                                • Re: Setting up slaves from a dumpEric Bergen1 Feb
                                  • Re: Setting up slaves from a dumpThomas2 Feb
                                    • Re: Setting up slaves from a dumpThomas2 Feb
                                      • Re: Setting up slaves from a dumpThomas2 Feb
                                        • Re: Setting up slaves from a dumpThomas2 Feb
                                          • Re: Setting up slaves from a dumpThomas2 Feb
                                            • Replication does not startThomas Ackermann2 Feb
                                              • Master does not write binary logs! (was: Re: Replication does notstart)Thomas Ackermann2 Feb
                                                • Re: Master does not write binary logs! (was: Re: Replication does not start)Claudio J. Chiabai2 Feb
                                                  • Re: Master does not write binary logs! (was: Re: Replication does not start)Claudio J. Chiabai2 Feb
                                                    • Re: Master does not write binary logs!Thomas2 Feb
                                                      • RE: Master does not write binary logs!Rick James2 Feb
                          • Re: Replication of certain databases only?Thomas1 Feb
                      • Re: Replication of certain databases only?Claudio J. Chiabai30 Jan
                        • Re: Replication of certain databases only?Thomas Ackermann30 Jan
                          • Re: Replication of certain databases only?Claudio J. Chiabai30 Jan
                      • Re: Replication of certain databases only?Jan-Aage Frydenbø-Bruvoll30 Jan
          • Re: Replication of certain databases only?Jan-Aage Frydenbø-Bruvoll30 Jan