The Error Log Early-Startup Logging Output Format System Variables That Affect Error Log Format 5.4.2.10 Error Log File Flushing and Renaming If you flush the error log using a  FLUSH ERROR LOGS  or  FLUSH LOGS  statment, or a  mysqladmin flush-logs  command, the server closes and reopens any error log file to which it is writing. To rename an error log file, do so manually before flushing. Flushing the logs then opens a new file with the original file name. For example, assuming a log file name of  host_name .err , use the following commands to rename the file and create a new one: On Windows, use  rename  rather than  mv . If the location of the error log file is not writable by the server, the log-flushing operation fails to create a new log file. For example, on Linux, the server might write the error log to the  /var/log/mysqld.log file, where the  /var/log  directory is owned by  root  and is not writable by  mysqld . For information about handling this case, see Section 5.4.6, “Server Log Maintenance” . mv  host_name .err  host_name .err-old mysqladmin flush-logs mv  host_name .err-old  backup-directory 2020-08-07T15:02:00.832521Z (UTC) 2020-08-07T10:02:00.832521-05:00 (SYSTEM) The server generates some error log messages before startup options have been processed, and thus before it knows error log settings such as the  log_error_verbosity  and  log_timestamps  system variable values, and before it knows which log components are to be used. The server handles error log messages that are generated early in the startup process as follows: If a fatal error occurs before log configuration is known and the server must exit, the server formats buffered messages using the logging defaults so they are not lost. If no fatal error occurs but startup is excessively slow prior to processing startup options, the server periodically formats and flushes buffered messages using the logging defaults so as not to appear unresponsive. Although this behavior is similar to pre-8.0.14 behavior in that the defaults are used, it is preferable to losing messages when exceptional conditions occur. The  log_timestamps  system variable controls the time zone of timestamps in messages written to the error log (as well as to general query log and slow query log files). The server applies  log_timestamps to error events before they reach any log sink; it thus affects error message output from all sinks. Permitted  log_timestamps  values are  UTC  (the default) and  SYSTEM  (the local system time zone). Timestamps are written using ISO 8601 / RFC 3339 format:  YYYY-MM-DD T hh:mm:ss.uuuuuu  plus a tail value of  Z  signifying Zulu time (UTC) or  –hh:mm  (an offset that indicates the local system time zone adjustment relative to UTC). For example: 1044 •Prior to MySQL 8.0.14, the server generates messages with the default timestamp, format, and verbosity level, and buffers them. After the startup options are processed and the error log configuration is known, the server flushes the buffered messages. Because these early messages use the default log configuration, they may differ from what is specified by the startup options. Also, the early messages are not flushed to log sinks other than the default. For example, logging to the JSON sink does not include these early messages because they are not in JSON format. •As of MySQL 8.0.14, the server buffers log events rather than formatted log messages. This enables it to retroactively apply configuration settings to those events after the settings are known, with the result that flushed messages use the configured settings, not the defaults. Also, messages are flushed to all configured sinks, not just the default sink.