Oracle 5.0 Reference Manual page 1459

Table of Contents

Advertisement

Perform the slave setup steps on each slave.
Because there is no data to load or exchange on a new server configuration you do not need to copy or
import any information.
If you are setting up a new replication environment using the data from a different existing database
server, you will now need to run the dump file generated from that server on the new master. The
database updates will automatically be propagated to the slaves:
shell>
mysql -h master < fulldb.dump
16.1.1.8. Setting Up Replication with Existing Data
When setting up replication with existing data, you will need to decide how best to get the data from the
master to the slave before starting the replication service.
The basic process for setting up replication with existing data is as follows:
1. With the MySQL master running, create a user to be used by the slave when connecting to the
master during replication. See
2. If you have not already configured the
master server, you will need to shut it down to configure these options. See
"Setting the Replication Master
If you have to shut down your master server, this is a good opportunity to take a snapshot of its
databases. You should obtain the master status (see
Master Binary Log
and taking a snapshot. For information on how to create a snapshot using raw data files, see
Section 16.1.1.6, "Creating a Data Snapshot Using Raw Data
3. If your master server is already correctly configured, obtain its status (see
"Obtaining the Replication Master Binary Log
snapshot (see
snapshot of the live server using the guide in
Raw Data
4. Update the configuration of the slave. See
Configuration".
5. The next step depends on how you created the snapshot of data on the master.
If you used mysqldump:
a. Start the slave, using the
start.
b. Import the dump file:
shell>
If you created a snapshot using the raw data files:
a. Extract the data files into your slave data directory. For example:
shell>
You may need to set permissions and ownership on the files so that the slave server can
access and modify them.
b. Start the slave, using the
start.
How to Set Up Replication
Section 16.1.1.3, "Creating a User for
Configuration".
Coordinates") before taking down the master, updating the configuration
Section 16.1.1.5, "Creating a Data Snapshot Using
Files".
--skip-slave-start
mysql < fulldb.dump
tar xvf dbdump.tar
--skip-slave-start
[1442]
and enabled binary logging on the
server-id
Section 16.1.1.4, "Obtaining the Replication
Coordinates") and then use
Section 16.1.1.6, "Creating a Data Snapshot Using
Section 16.1.1.2, "Setting the Replication Slave
[1462]
option so that replication does not
[1462]
option so that replication does not
1439
Replication".
Section 16.1.1.1,
Files".
Section 16.1.1.4,
mysqldump
mysqldump") or take a raw
to take a

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents