Home > MySQL > Monitor MySQL Log File

Monitor MySQL Log File

March 2, 2009 Posted by KP

I rarely check MySQL log file, but recently I got some table corruption errors, and it’s hard to notice these errors, especially when these tables are not critical. I realized that it’s necessary to monitor MySQL log file. According to MySQL manual, before version 5.1.20, it’s not possible to log MySQL errors to syslog. I’m still using 5.0, so I added the following line to cron job of my root account:

30 2 * * * tail -n 50 /var/db/mysql/hostname.err

Now I get notification email daily (no email if it’s empty), not a bad solution.

Bookmark and Share


Related Posts:

Filed Under: MySQL

2 Comments to “Monitor MySQL Log File”

  1. Chris Says:

    No point in only checking them once a day if they’ve been corrupted all day.

  2. FreeBSD Newbie Says:

    I didn’t check it at all, once per day is a big progress. :-)

Leave a Comment









*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Categories

Archives

Meta