Oracle 5.0 Reference Manual page 1149

Table of Contents

Advertisement

The next example shows an operation that is less frequently employed. It is used when the slave
has relay log files that you want it to execute again for some reason. To do this, the master need not
be reachable. You need only use
SQL_THREAD):
CHANGE MASTER TO
RELAY_LOG_FILE='slave-relay-bin.006',
RELAY_LOG_POS=4025;
You can even use the second operation in a nonreplication setup with a standalone, nonslave server
for recovery following a crash. Suppose that your server has crashed and you have restored it from
a backup. You want to replay the server's own binary log files (not relay log files, but regular binary
log files), named (for example) myhost-bin.*. First, make a backup copy of these binary log files
in some safe place, in case you don't exactly follow the procedure below and accidentally have the
server purge the binary log. Use
the server without the
[1459],
id
--relay-log=myhost-bin
log files are relay log files) and
these statements:
CHANGE MASTER TO
RELAY_LOG_FILE='myhost-bin.153',
RELAY_LOG_POS=410,
MASTER_HOST='some_dummy_string';
START SLAVE SQL_THREAD;
The server reads and executes its own binary log files, thus achieving crash recovery. Once the
recovery is finished, run
files, and restart the server with its original options.
log.info
Specifying the
is a slave.
13.4.2.2.
LOAD DATA FROM MASTER
LOAD DATA FROM MASTER
This feature is deprecated and should be avoided. It is subject to removal in a future version of
MySQL.
Since the current implementation of
very limited, these statements are deprecated as of MySQL 4.1 and removed in MySQL 5.5.
The recommended alternative solution to using
is using
MASTER
and DBD:mysql) and works for
SQL dumps on the master and pipe (or copy) these to a
advantage of working for all storage engines, but can be quite slow, since it works using SELECT.
This statement takes a snapshot of the master and copies it to the slave. It updates the values of
MASTER_LOG_FILE
position. Any table and database exclusion rules specified with the
replicate-*-ignore-*
account because a user could use this option to set up a nonunique mapping such as
rewrite-db="db1->db3"
would confuse the slave when loading tables from the master.
Use of this statement is subject to the following conditions:
• It works only for
ERROR 1189 (08S01): Net error reading from master
SQL Statements for Controlling Slave Servers
CHANGE MASTER TO
SET GLOBAL relay_log_purge=0
[1467]
--log-bin
--skip-slave-start
SLAVE, shut down the server, delete the
STOP
option (even with a dummy value) is required to make the server think it
MASTER_HOST
Syntax
LOAD DATA FROM MASTER
or mysqlhotcopy. The latter requires Perl and two Perl modules
mysqldump
MyISAM
and
MASTER_LOG_POS
options are honored.
[1458]
and
tables. Attempting to load a
MyISAM
and start the SQL thread
option, Instead, use the
[1455]
(to make the server believe that these regular binary
[1462]
options. After the server starts, issue
LOAD DATA FROM MASTER
and
tables only. With mysqldump, you can create
ARCHIVE
mysql
so that the slave starts replicating from the correct
--replicate-rewrite-db
--replicate-rewrite-db="db2->db3"
non-MyISAM
1129
(START SLAVE
for additional safety. Then start
--replicate-same-server-
master.info
and
LOAD TABLE FROM MASTER
or
LOAD TABLE FROM
client on the slave. This has the
--replicate-*-do-*
[1458]
is not taken into
--replicate-
[1458], which
table results in the following error:
and
relay-
is
(DBI
and
--

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents