2 - Official MySQL rules for OSSEC.
4 - Copyright (C) 2009 Trend Micro Inc.
7 - This program is a free software; you can redistribute it
8 - and/or modify it under the terms of the GNU General Public
9 - License (version 2) as published by the FSF - Free Software
12 - License details: http://www.ossec.net/en/licensing.html
16 <!-- MYSQL Log messages -->
17 <group name="mysql_log,">
18 <rule id="50100" level="0">
19 <decoded_as>mysql_log</decoded_as>
20 <description>MySQL messages grouped.</description>
23 <rule id="50105" level="3">
24 <if_sid>50100</if_sid>
25 <regex>^MySQL log: \d+ \S+ \d+ Connect</regex>
26 <description>Database authentication success.</description>
27 <group>authentication_success,</group>
30 <rule id="50106" level="9">
31 <if_sid>50105</if_sid>
32 <match>Access denied for user</match>
33 <description>Database authentication failure.</description>
34 <group>authentication_failed,</group>
37 <rule id="50107" level="0">
38 <if_sid>50100</if_sid>
39 <regex>^MySQL log: \d+ \S+ \d+ Query</regex>
40 <description>Database query.</description>
43 <rule id="50108" level="3">
44 <if_sid>50100</if_sid>
45 <regex>^MySQL log: \d+ \S+ \d+ Quit</regex>
46 <description>User disconnected from database.</description>
49 <rule id="50120" level="12">
50 <if_sid>50100</if_sid>
51 <match>mysqld ended|Shutdown complete</match>
52 <description>Database shutdown messge.</description>
53 <group>service_availability,</group>
56 <rule id="50121" level="3">
57 <if_sid>50100</if_sid>
58 <match>mysqld started|mysqld restarted</match>
59 <description>Database startup message.</description>
60 <group>service_availability,</group>
63 <rule id="50125" level="5">
64 <if_sid>50100</if_sid>
65 <regex>^MySQL log: \d+ \S+ \d+ [ERROR]</regex>
66 <description>Database error.</description>
69 <rule id="50126" level="12">
70 <if_sid>50125</if_sid>
71 <match>Fatal error:</match>
72 <description>Database fatal error.</description>
73 <group>service_availability,</group>
76 <rule id="50180" level="10" frequency="6" timeframe="120" ignore="60">
77 <if_matched_sid>50125</if_matched_sid>
78 <description>Multiple database errors.</description>
79 <group>service_availability,</group>
82 </group> <!-- MYSQL -->