If the master database contains existing data it is necessary to copy this data to each slave.

Before preceding it may be a good idea to truncate the log files as this process could take some time.  This will help shorten the process: Truncate audit trail [MC-TKTD]

To create a snapshot of the data in an existing master database, use the mysqldump tool.

1. Start a MySQL console session on the master

2. Flush all tables and block write statements by executing the FLUSH TABLES WITH READ LOCK statement:

mysql> FLUSH TABLES WITH READ LOCK; 

3. Start a different OS console session on the master, run the mysqldump command to export the DualShield database

> mysqldump -u root -p --opt DualShield > DualShield.sql 

4. Close the second console session. Go back to the first console session and run the command below to release the lock

mysql> UNLOCK TABLES;
  • No labels