Replication and Binary Logging Options and Variables When you first start the server with binary log encryption enabled, a new binary log encryption key is generated before the binary log and relay logs are initialized. This key is used to encrypt a file password for each binary log file (if the server has binary logging enabled) and relay log file (if the server has replication channels), and further keys generated from the file passwords are used to encrypt the data in the files. Relay log files are encrypted for all channels, including Group Replication applier channels and new channels that are created after encryption is activated. The binary log index file and relay log index file are never encrypted. If you activate encryption while the server is running, a new binary log encryption key is generated at that time. The exception is if encryption was active previously on the server and was then disabled, in which case the binary log encryption key that was in use before is used again. The binary log file and relay log files are rotated immediately, and file passwords for the new files and all subsequent binary log files and relay log files are encrypted using this binary log encryption key. Existing binary log files and relay log files still present on the server are not automatically encrypted, but you can purge them if they are no longer needed. If you deactivate encryption by changing the  binlog_encryption  system variable to  OFF , the binary log file and relay log files are rotated immediately and all subsequent logging is unencrypted. Previously encrypted files are not automatically decrypted, but the server is still able to read them. The BINLOG_ENCRYPTION_ADMIN  privilege (or the deprecated  SUPER  privilege) is required to activate or deactivate encryption while the server is running. Group Replication applier channels are not included in the relay log rotation request, so unencrypted logging for these channels does not start until their logs are rotated in normal use. For more information on binary log file and relay log file encryption, see Section 17.3.2, “Encrypting Binary Log Files and Relay Log Files” . • binlog_error_action When  binlog_error_action  is set to  IGNORE_ERROR , if the server encounters such an error it continues the ongoing transaction, logs the error then halts logging, and continues performing updates. 3549 Command-Line Format --binlog-error-action[=value] System Variable binlog_error_action Scope Global Dynamic Yes SET_VAR  Hint Applies No Type Enumeration Default Value ABORT_SERVER Valid Values IGNORE_ERROR ABORT_SERVER Controls what happens when the server encounters an error such as not being able to write to, flush or synchronize the binary log, which can cause the source’s binary log to become inconsistent and replicas to lose synchronization. This variable defaults to  ABORT_SERVER , which makes the server halt logging and shut down whenever it encounters such an error with the binary log. On restart, recovery proceeds as in the case of an unexpected server halt (see Section 17.4.2, “Handling an Unexpected Halt of a Replica” ).