general_log file under Mysql folder is continuously increasing causing high disk utilization.

Document ID : KB000045772
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue:

How can we disable general_log file size  to reduce  disk utilization

 Cause:

 general log file which is present in specroot/mysql/bin is used to debug the mysql errors

If we turn on debug for mysql in CA spectrum. If there is any errors related to mysql it is stored in general_log file  due to which file size increases .

$SPECROOT/mysql/bin 
./mysql -uroot -proot 
mysql> set global general_log='on'; 

 Note: On a Spectrum Report Manager host that can easily generate hundreds of queries per minute the log file will grow in size quickly.

 

 Resolution:

 To  fix this issue turn off debug for mysql

 $SPECROOT/mysql/bin 
./mysql -uroot -proot 
 mysql> set global general_log='off'; 

Delete general_log file and then Create the general_log file

  Using touch command:

  goto specroot/mysql/bin directory

   touch general_log