On Tue, Nov 20, 2012 at 9:28 PM, peng lin <linpeng0...@gmail.com> wrote: > hi,i upgrade to ossec 2.7 final . both 2.7 final and 2.7 bete2 ,i used mysql > to store message,everything seems ok,mysql have datas, but > sometimes , i saw this error: > > 2012/11/21 10:03:38 ossec-dbd(5203): ERROR: Error executing query 'SELECT id > FROM location WHERE name = 'ossec-hids->/var/log/secure' AND server_id = '1' > LIMIT 1'. Error: 'MySQL > server has gone away'. > 2012/11/21 10:03:38 ossec-dbd(5209): INFO: Closing connection to database. > 2012/11/21 10:03:38 ossec-dbd(5210): INFO: Attempting to reconnect to > database. > 2012/11/21 10:03:38 ossec-dbd(5202): ERROR: Error connecting to database > 'localhost'(ossec): ERROR: Unknown MySQL server host 'localhost' > (1793064061). > 2012/11/21 10:03:40 ossec-dbd(5210): INFO: Attempting to reconnect to > database. > 2012/11/21 10:03:40 ossec-dbd(5202): ERROR: Error connecting to database > 'localhost'(ossec): ERROR: Unknown MySQL server host 'localhost' > (1793064061).
Try 127.0.0.1 instead of localhost. > 2012/11/21 10:03:44 ossec-dbd(5210): INFO: Attempting to reconnect to > database. > 2012/11/21 10:03:44 ossec-dbd(5202): ERROR: Error connecting to database > 'localhost'(ossec): ERROR: Unknown MySQL server host 'localhost' > (1793064061). > 2012/11/21 10:03:52 ossec-dbd(5210): INFO: Attempting to reconnect to > database. > and ossec stop log data to mysql . how to fix it ?