itself MySQL will generate a bunch of mysql.bin.* of the log, for our small web site, there is no real big use, and may be stuffed with our hard drive. Under normal circumstances, the little night will shut him, anyway I have every hour of mysqldump export record archive.
Locate the file/etc/my.cnf note the following 2 line files:
#log-bin=mysql-bin
#binlog_format =mixed
Of course, if you have to keep, you can shorten the log save time, the default is 10 days.
Expire_logs_days = #修改此项即可
We can use the following command to clean the MySQL log file:
Rm-f/usr/local/mysql/var/mysql-bin.*
Then we reboot our VPS if it is LNMP used:
/ROOT/LNMP restart
Mysql
Slow query log
Note or delete the log-slow-queries directive in my.cnf, no this instruction does not generate a log by default.
Binary Bin-log Log
Note or delete the Log-bin directive in my.cnf, no this instruction does not generate a log by default.
Error log
Log-error=/dev/null, there is no default build log for this directive.