What if the general log of mysql is too big?

what to do if the general log of mysql is too large

Mar.20,2021

you can cut logs at the same time every day through Logrotate .
needs to maintain a configuration file as follows:

/var/log/mysql/*.log {
  create 644 mysql mysql
  notifempty
  daily
  rotate 5
  missingok
  nocompress
  sharedscripts
  postrotate
  -sharp run if mysqld is running
  if test -n "`ps acx|grep mysqld`"; then
    /usr/bin/mysqladmin flush-logs
  fi
  endscript
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4763c-44c3c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4763c-44c3c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?