13.7.5.32 SHOW RELAYLOG EVENTS Statement
SHOW RELAYLOG EVENTS
[IN 'log_name']
[FROM pos]
[LIMIT [offset,] row_count]
[channel_option]
channel_option:
FOR CHANNEL channel
Shows the events in the relay log of a replica. If you do not specify ', the first relay log is displayed. This statement has no effect on the source. log_name'SHOW RELAYLOG EVENTS requires the REPLICATION SLAVE privilege.
The LIMIT clause has the same syntax as for the SELECT statement. See Section 13.2.9, “SELECT Statement”.
Issuing a SHOW RELAYLOG EVENTS with no LIMIT clause could start a very time- and resource-consuming process because the server returns to the client the complete contents of the relay log (including all statements modifying data that have been received by the replica).
The optional FOR CHANNEL
clause enables you to name which replication channel the statement applies to. Providing a channelFOR CHANNEL
clause applies the statement to a specific replication channel. If no channel is named and no extra channels exist, the statement applies to the default channel. channel
When using multiple replication channels, if a SHOW RELAYLOG EVENTS statement does not have a channel defined using a FOR CHANNEL
clause an error is generated. See Section 16.2.2, “Replication Channels” for more information. channel
SHOW RELAYLOG EVENTS displays the following fields for each event in the relay log:
-
Log_nameThe name of the file that is being listed.
-
PosThe position at which the event occurs.
-
Event_typeAn identifier that describes the event type.
-
Server_idThe server ID of the server on which the event originated.
-
End_log_posThe value of
End_log_posfor this event in the source's binary log. -
InfoMore detailed information about the event type. The format of this information depends on the event type.
Some events relating to the setting of user and system variables are not included in the output from SHOW RELAYLOG EVENTS. To get complete coverage of events within a relay log, use mysqlbinlog.
© 2025 Oracle
Licensed under the GPLv2 License.