rivkamak
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.
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.
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.
ASKER
Its a windows machine does that make a difference?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much Tomas. It worked.