If you use MySQL replication to replicate InnoDB tables, MySQL Enterprise Backup allows you to set up a slave database without stopping the master because you can make a restored hot backup a new slave database.
Take the backup, use
to restore it, and put the restored backup and the log files
to the right places for the new slave.
my.cnf file of the new slave so
that you put
skip-slave-start to the
Start the new slave
>= 5.1). It prints the latest MySQL binlog position the
backup knows of.
… InnoDB: Last MySQL binlog file position 0 128760128, file name ./hundin-bin.006 …
Note that InnoDB only stores the binlog position information to its tablespace at a transaction commit. To make InnoDB aware of the current binlog position, you must run at least one transaction while binlogging is enabled.
CHANGE MASTER SQL command on the
slave to initialize it properly. For example:
CHANGE MASTER TO MASTER_LOG_FILE='hundin-bin.006', MASTER_LOG_POS=128760128;
Start replication in the new slave with the
START SQL command.
Remove the line
skip-slave-start from the
my.cnf file of the slave.