Replication and Binary Logging Options and Variables Maximum Value 1073741824 Block Size 4096 If a write by a replica to its relay log causes the current log file size to exceed the value of this variable, the replica rotates the relay logs (closes the current file and opens the next one). If max_relay_log_size  is 0, the server uses  max_binlog_size  for both the binary log and the relay log. If  max_relay_log_size  is greater than 0, it constrains the size of the relay log, which enables you to have different sizes for the two logs. You must set  max_relay_log_size  to between 4096 bytes and 1GB (inclusive), or to 0. The default value is 0. See Section 17.2.3, “Replication Threads” . • relay_log Command-Line Format --relay-log=file_name System Variable relay_log Scope Global Dynamic No SET_VAR  Hint Applies No Type File name The base name for relay log files. For the default replication channel, the default base name for relay logs is  host_name -relay-bin . For non-default replication channels, the default base name for relay logs is  host_name -relay-bin- channel , where  channel  is the name of the replication channel recorded in this relay log. The server writes the file in the data directory unless the base name is given with a leading absolute path name to specify a different directory. The server creates relay log files in sequence by adding a numeric suffix to the base name. The relay log and relay log index on a replication server cannot be given the same names as the binary log and binary log index, whose names are specified by the  --log-bin  and  --log-bin-index options. The server issues an error message and does not start if the binary log and relay log file base names would be the same. Due to the manner in which MySQL parses server options, if you specify this variable at server startup, you must supply a value;  the default base name is used only if the option is not actually specified . If you specify the  relay_log  system variable at server startup without specifying a value, unexpected behavior is likely to result; this behavior depends on the other options used, the order in which they are specified, and whether they are specified on the command line or in an option file. For more information about how MySQL handles server options, see Section 4.2.2, “Specifying Program Options” . If you specify this variable, the value specified is also used as the base name for the relay log index file. You can override this behavior by specifying a different relay log index file base name using the relay_log_index  system variable. When the server reads an entry from the index file, it checks whether the entry contains a relative path. If it does, the relative part of the path is replaced with the absolute path set using the  relay_log  system variable. An absolute path remains unchanged; in such a case, the index must be edited manually to enable the new path or paths to be used. You may find the  relay_log  system variable useful in performing the following tasks: •Creating relay logs whose names are independent of host names. 3519