最近两三天发现服务器不知什么疯狂地用了几G空间,非常不解
用
du -s * | sort -nr | head
一步步查竟然发现时mysql log 文件占用了这几个G的空间。
[root@phpfans var]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Command
Your MySQL connection id is 29
Server version: 5.1.45-log Source dist
Type 'help;' or '\h' for help. Type '\
mysql> show binary logs;
+------------------+------------+
| Log_name | File_size |
+------------------+------------+
| mysql-bin.000001 | 19091 |
| mysql-bin.000002 | 716893 |
| mysql-bin.000003 | ...