شرح تفريغ اخطاء السيرفر Safely empty MySQL .log & .err files on cPanel Servers
Safe to delete /var/lib/mysql/ .err files?

Over time the .log & .err files on cPanel servers can become huge, more often that not you should always investigate what is causing these files to generate to huge capacity in case there are issues with the databases that you are running.
We always investigate and keep our servers tidy, so ensuring these are regularly cleaned help us to monitor and fix any problems with MySQL.
cat /dev/null is often referred to a black hole in Linux based systems because it discards all data written and sends End of File character to any process reading data from it. This lets us clear the contents of a file.
Navigate to the MySQL directory on cPanel
كود:
cd /var/lib/mysql/
Run ls -l to find your file
كود:
ls -l
Clear the contents of the MySQL Error Log and Log File

كود:
cat /dev/null > /var/lib/mysql/mysql.server.com.err 

 cat /dev/null > /var/lib/mysql/mysql.server.com.log
Check the files are empty


كود:
ls -l mysql.server.com.err 

 ls -l mysql.server.com.log
المرجع:
https://5wire.co.uk/safely-empty-mys...panel-servers/
https://forums.cpanel.net/threads/sa...-files.241681/