MySQL DBA - Tips and Techniques Magazine

12 Oct 2014

Move error log to stop error log messages

Once an error has been resolved, to stop it sending email alerts we need to clear the logfile down.

 

a) find the log

 

ps -ef|grep mysql

 

root     12201     1  0 Jan17 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/mk-fusion-2.uk.intranet.pid

 

b) clear the logfile down

 

cd /var/lib/mysql

 

cp mk-fusion-2.uk.intranet.err mk-fusion-2.uk.intranet.err.040208

 

> mk-fusion-2.uk.intranet.err

 

c) check permissions and owner of logfile are still correct

 

ls –lrt mk-fusion-2.uk.intranet.err

 

-rw-rw-rw-  1 mysql mysql         0 Feb  4 09:36 mk-fusion-2.uk.intranet.err

 

No comments:

Post a Comment