Replication Relay and Status Logs
1479
• If the value of
max_relay_log_size
[470]
is 0,
max_binlog_size
[1472]
determines the
maximum relay log file size.
The SQL thread automatically deletes each relay log file as soon as it has executed all events in the
file and no longer needs it. There is no explicit mechanism for deleting relay logs because the SQL
thread takes care of doing so. However,
FLUSH LOGS
rotates relay logs, which influences when the
SQL thread deletes them.
16.2.2.2. Slave Status Logs
A replication slave server creates two logs. By default, these logs are files named
master.info
and
relay-log.info
and created in the data directory. The names and locations of these files can
be changed by using the
--master-info-file
[1453]
and
--relay-log-info-file
[1456]
options, respectively. See
Section 16.1.2, “Replication and Binary Logging Options and Variables”
.
The two status logs contain information like that shown in the output of the
SHOW SLAVE STATUS
statement, which is discussed in
Section 13.4.2, “SQL Statements for Controlling Slave Servers”
.
Because the status logs are stored on disk, they survive a slave server's shutdown. The next time the
slave starts up, it reads the two logs to determine how far it has proceeded in reading binary logs from
the master and in processing its own relay logs.
The master info log should be protected because it contains the password for connecting to the master.
See
Section 6.1.2.3, “Passwords and Logging”
.
The slave I/O thread updates the master info log. The following table shows the correspondence
between the lines in the
master.info
file and the columns displayed by
SHOW SLAVE STATUS
.
Line in
master.info
SHOW SLAVE STATUS
Column
Description
1
Number of lines in the file
2
Master_Log_File
The name of the master binary log currently
being read from the master
3
Read_Master_Log_Pos
The current position within the master binary
log that have been read from the master
4
Master_Host
The host name of the master
5
Master_User
The user name used to connect to the
master
6
Password (not shown by
SHOW SLAVE
STATUS
)
The password used to connect to the master
7
Master_Port
The network port used to connect to the
master
8
Connect_Retry
The period (in seconds) that the slave will
wait before trying to reconnect to the master
9
Master_SSL_Allowed
Indicates whether the server supports SSL
connections
10
Master_SSL_CA_File
The file used for the Certificate Authority
(CA) certificate
11
Master_SSL_CA_Path
The path to the Certificate Authority (CA)
certificates
12
Master_SSL_Cert
The name of the SSL certificate file
13
Master_SSL_Cipher
The list of possible ciphers used in the
handshake for the SSL connection
14
Master_SSL_Key
The name of the SSL key file
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 ...