mysql初始化时错误日志不存在_MySQL错误日志总结

MySQL错误日志是记录MySQL 运行过程中较为严重的警告和错误信息,以及MySQL每次启动和关闭的详细信息。错误日志的命名通常为hostname.err。其中,hostname表示服务器主机名。

The error log contains information indicating when mysqld was started and stopped and also any critical errors that occur while the server is running. If mysqld notices a table that needs to be automatically checked or repaired, it writes a message to the error log. On some operating systems, the error log contains a stack trace if mysqld exits abnormally. The trace can be used to determine where mysqld exited. See Section 24.5, “Debugging and Porting MySQL”.

查看错误日志的位置

错误日志默认存放位置为数据目录下,你也可以用下面命令查看。例如下面是我测试服务的情况。

mysql> show variables like '%log_error%';+---------------+------------------------------------------------------+| Variable_name | Value                                                |+---------------+------------------------------------------------------

你可能感兴趣的:(mysql初始化时错误日志不存在_MySQL错误日志总结)