@@ -21,13 +21,25 @@ According to [mysql's docs][mysql-docs], there are about five different kinds of
21
21
Depending on storage engines used, you'll have other log files as well (innodb
22
22
log file, etc).
23
23
24
+ In most mysql deployments, there are 3 possible actors: the mysql server, mysql
25
+ clients, and replication parters. The logs tend to cover actions between pairs
26
+ of actors, or roughly the purpose of each log:
27
+
28
+ * internal mysql server: error log
29
+ * replication: binary and relay logs
30
+ * clients: general query and slow query logs
31
+
24
32
## Error Log
25
33
26
34
Relevant my.cnf settings: ` log-error ` , ` log-warnings ` .
27
35
28
- The error log generally contains information about mysqld's status; generally
29
- start and stop messages as well as critical errors. Unfortunately, mysql also
30
- logs warnings to the error log by default.
36
+ According to mysql's docs, the error log generally contains information about
37
+ mysqld's status; generally start and stop messages as well as critical errors.
38
+ Unfortunately, mysql also logs warnings to the error log by default.
39
+
40
+ What the docs don't say is that pretty much anything not data-related is logged
41
+ here. This log file is a complete mess. Most of what I see in the sample below
42
+ has nothing to do with errors or warnings.
31
43
32
44
120707 0:37:09 [Note] Plugin 'FEDERATED' is disabled.
33
45
120707 0:37:09 InnoDB: The InnoDB memory heap is disabled
@@ -51,6 +63,14 @@ The format of this log file is a bit confusing and pretty inconsistent. I'm not
51
63
sure how "highest supported file format is Barracuda." is an error or a
52
64
warning, but it's in the error log anyway. ☹
53
65
66
+ ### Mistakes
67
+
68
+ This log format is a bit strange. The timestamp seems consistent, even if it is
69
+ odd. The message seems to have no consistency, meaning 'grep' and other
70
+ pattern/text tools may be your chief weapons against this beast.
71
+
72
+ I wouldn't expect to achieve much in the ways of data mining from this log.
73
+
54
74
## General Query Log
55
75
56
76
This log appears to contain every request sent to the mysql server. Here's what
@@ -92,12 +112,3 @@ And in the general query log:
92
112
93
113
## Relay Log
94
114
95
-
96
- # Overview
97
-
98
- We can bucket these logs by purpose:
99
-
100
- * application internal: error log
101
- * replication: binary and relay logs
102
- * user: general query and slow query logs
103
-
0 commit comments