Link to home
Start Free TrialLog in
Avatar of rivkamak
rivkamakFlag for United States of America

asked on

How to properly manage .err logs in mysql server?

Hi,

I am not very familiar with mysql but I see that the .err files are taking up alot of memory on my server (27 GB worth). What is a safe way to deal with these .err files. Delete truncate, etc. And how would I go about doing it. I have mysql 5.7.

Thank you.
Avatar of David Favor
David Favor
Flag of United States of America image

Normal practice is to run logrotate nightly, which manages all log files, per logrotate recipes which determine how frequently to rotate logs, how many log files to keep, compression algorithm to use for old log files.
Avatar of rivkamak

ASKER

Its a windows machine does that make a difference?
ASKER CERTIFIED SOLUTION
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of skullnobrains
skullnobrains

Rotating logs is the obvious answer. And should be done in any case.

Reading the log files in order to figure out if and why unexpected repetitive messages end up in the log is what you also need to do
Thank you.

Tomas, when trying to execute mysqladmin flush-logs;  in the shell or in the workbench I am getting this generic error 1064 "You have an error in your sql syntax" Also says "mysqladmin is not a valid input at this position." Any ideas? Thank you.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much Tomas. It worked.