How to empty or delete /var/lib/mysql/ .err files?

You can clear the /var/lib/mysql/.err files, but if you have a lot of errors outputting into the error log, then you would probably want to check why that is happening. You should not delete the file, though, just clear it:

Code:
cat /dev/null > /var/lib/mysql/filename.err
As for the ibdata1 file, please do not remove or clear that file. That contains data for InnoDB table storage engine. MySQL will cease functioning properly if you clear or remove that file in any way.



you can also set a cron job to do so:

command="cat /dev/null > /var/lib/mysql/file.err"
job="0 0 * * 0 $command"
cat <(fgrep -i -v "$command" <(crontab -l)) <(echo "$job") | crontab -

Popular posts from this blog

How to Delete WHM Mail Queue through SSH sent from a particular sender

how to change witribe wlan password? how to secure your witribe router

SOLVED: WHM/CPANEL Your server does not support the connection encryption type you have specified. Try changing the encryption method