LOAD DATA FROM MASTER

Takes a snapshot of the master and copies it to the slave.  It updates the
values of MASTER_LOG_FILE and MASTER_LOG_POS so that the slave
will start replicating from the correct position. Any table and database
exclusion rules specified with the --replicate-*-do-* and
--replicate-*-ignore-* options are honored.
--replicate-rewrite-db is /not/ taken into account (because one user
could, with this option, set up a non-unique mapping such as
--replicate-rewrite-db=db1->db3 and
--replicate-rewrite-db=db2->db3, which would confuse the slave when
it loads the master's tables).

Use of this statement is subject to the following conditions:


 --- It works only with MyISAM tables.

 --- It acquires a global read lock on the master while taking the snapshot,
which prevents updates on the master during the load operation.


In the future, it is planned to make this statement work with
InnoDB tables and to remove the need for a global read lock by using
non-blocking online backup.

If you are loading big tables, you might have to increase the values
of net_read_timeout and net_write_timeout
on both your master and slave servers.
See also : [Server system variables].

Note that LOAD DATA FROM MASTER does /not/ copy any
tables from the mysql database.  This makes it easy to have
different users and privileges on the master and the slave.

The LOAD DATA FROM MASTER statement
requires the replication account that is used to connect to the master
to have the RELOAD and SUPER privileges on the master and the
SELECT privilege for all master tables you want to load. All
master tables for which the user does not have the SELECT privilege are
ignored by LOAD DATA FROM MASTER. This is because the
master will hide them from the user: LOAD DATA FROM MASTER calls
SHOW DATABASES to know the master databases to load, but
SHOW DATABASES returns only databases for which the user has
some privilege.
See [Show database info].
On the slave's side, the user that issues LOAD DATA FROM MASTER should
have grants to drop and create the databases and tables that are copied.
