当前位置:嗨网首页>书籍在线阅读

04-查看错误日志

  
选择背景色: 黄橙 洋红 淡粉 水蓝 草绿 白色 选择字体: 宋体 黑体 微软雅黑 楷体 选择字体大小: 恢复默认

14.1.2 查看错误日志

错误日志是以文本文件的形式存储的,直接使用普通文本工具就可以打开查看。Windows操作系统可以使用文本编辑器查看。Linux操作系统下,可以使用VI工具或者使用gedit工具来查看。

通过SHOW命令可以查看错误日志文件所在目录及文件名信息。

mysql> show variables like 'log_error'; +---------------+---------------------------------------------+ |Variable_name|Value | +---------------+---------------------------------------------+ |log_error |E:\mysql-5.6.22-winx64\data\salonshi-PC.err| +---------------+---------------------------------------------+ 1 row in set (0.00 sec)

错误日志信息可以通过记事本打开查看。从上面查看命令中可以知道错误日志所在路径及文件名。打开文件salonshi-PC.err,其样板信息如下。

2015-02-14 09:58:18 3612 [Note] Plugin 'FEDERATED' is disabled. 2015-02-14 09:58:18 3612 [Note] InnoDB: Using atomics to ref count buffer pool pages 2015-02-14 09:58:19 3612 [Note] InnoDB: The InnoDB memory heap is disabled 2015-02-14 09:58:19 3612 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2015-02-14 09:58:19 3612 [Note] InnoDB: Memory barrier is not used 2015-02-14 09:58:19 3612 [Note] InnoDB: 128 rollback segment(s) are active. 2015-02-14 09:58:19 3612 [Note] InnoDB: Waiting for purge to start 2015-02-14 09:58:19 3612 [Note] InnoDB: 5.6.22 started; log sequence number 1625977 2015-02-14 09:58:19 3612 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started.Generating a new UUID: f2ca197d-b3ec-11e4-9d75-e4115b3ab377. 2015-02-14 09:58:19 3612 [Note] Server hostname (bind-address): '*'; port: 3306 2015-02-14 09:58:19 3612 [Note] IPv6 is available. 2015-03-14 09:42:17 1788 [Note] Server socket created on IP: '::'. 2015-03-14 09:42:19 1788 [Note] Event Scheduler: Loaded 0 events 2015-03-14 09:42:19 1788 [Note] MySQL: ready for connections. Version:'5.6.22-log' socket:'' port:3306 MySQL Community Server(GPL)

通过以上信息可以看出错误日志记载了系统的一些错误和警告错误。