Name
LOAD DATA FROM MASTER
Synopsis
LOAD DATA FROM MASTER
This statement makes a
copy of all the databases on the master server (except the
mysql database) and then copies them to the
slave servers. This statement will get a global read lock on all
tables while it takes a snapshot of the databases. It will release
the lock before copying them to the slaves. The
MASTER_LOG_FILE and the
MASTER_LOG_POS variables will be updated so that
the slave knows where to begin logging. This statement currently
works only with MyISAM tables, but will eventually work with InnoDB
tables in future releases. The user for the connection must have
RELOAD, SELECT, and
SUPER privileges on the master server. The user
must also have CREATE and DROP
privileges on the slave server.
For large databases, increase the
values of the net_read_timeout and
net_write_timeout variables with the
SET statement. To load a specific table from the
master server, use the LOAD TABLE...FROM MASTER
statement.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access