Replication and Binary Logging Options and Variables
1451
master-host=
some_host
The first time you start the server as a replication slave, it reads and uses that option from the
my.cnf
file. The server then records the value in the
master.info
file. The next time you start the server, it
reads the master host value from the
master.info
file only and ignores the value in the option file. If
you modify the
my.cnf
file to specify a different master host of
some_other_host
, the change still
has no effect. You should use
CHANGE MASTER TO
instead.
Because the server gives an existing
master.info
file precedence over the startup options just
described, you might prefer not to use startup options for these values at all, and instead specify them
by using the
CHANGE MASTER TO
statement. See
Section 13.4.2.1, “
CHANGE MASTER TO
Syntax”
.
This example shows a more extensive use of startup options to configure a slave server:
[mysqld]
server-id=2
master-host=db-master.mycompany.com
master-port=3306
master-user=pertinax
master-password=freitag
master-connect-retry=60
report-host=db-slave.mycompany.com
Startup options for replication slaves.
The following list describes startup options for controlling
replication slave servers. Many of these options can be set while the server is running by using the
CHANGE MASTER TO
statement. Others, such as the
--replicate-*
options, can be set only when
the slave server starts. Replication-related system variables are discussed later in this section.
•
--abort-slave-event-count
[1451]
Command-Line Format
--abort-slave-event-count=#
Option-File Format
abort-slave-event-count
Permitted Values
Type
numeric
Default
0
Min
Value
0
When this option is set to some positive integer
value
other than 0 (the default) it affects replication
behavior as follows: After the slave SQL thread has started,
value
log events are permitted to be
executed; after that, the slave SQL thread does not receive any more events, just as if the network
connection from the master were cut. The slave thread continues to run, and the output from
SHOW
SLAVE STATUS
displays
Yes
in both the
Slave_IO_Running
and the
Slave_SQL_Running
columns, but no further events are read from the relay log.
This option is used internally by the MySQL test suite for replication testing and debugging. It is not
intended for use in a production setting.
•
--disconnect-slave-event-count
[1451]
Command-Line Format
--disconnect-slave-event-count=#
Option-File Format
disconnect-slave-event-count
Permitted Values
Type
numeric
Default
0
This option is used internally by the MySQL test suite for replication testing and debugging.
•
--log-slave-updates
[1451]
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...