mysql> show variables like 'log_%';
+---------------------------------+---------------------------+
| Variable_name | Value
+---------------------------------+---------------------------+
| log_bin | ON
| log_bin_trust_function_creators | OFF
| log_bin_trust_routine_creators | OFF
| log_error | /data0/log/mysqld1111.log
| log_output | FILE
| log_queries_not_using_indexes | ON
| log_slave_updates | OFF
| log_slow_queries | ON
| log_warnings | 1
+---------------------------------+---------------------------+
[root@localhost log]# ls -lrt
-rw-rw---- 1 mysql mysql 4971002 02-19 08:11 low1111.log
-rw-rw---- 1 mysql mysql 14628742 02-19 09:00 mysqld1111.log
-rw-rw---- 1 mysql mysql 5849703903 02-19 09:37 sql1111.log
帮我看看这个文件怎么让他变小,硬盘快爆掉了
里面的内容大致是记录数据的操作,内容大致如下:
140118 18:00:01 1408 Connect root@*。*。*。* on
1408 Init DB soccergame
1408 Query SELECT COUNT(id) as num FROM `bak` WHERE `fde` = '2014-01-17'
1408 Quit
140118 18:00:11 1409 Connect root@*。*。*。* on DBNAME
1409 Query select @@version_comment limit 1
1409 Query /*!40019 SET @@session.max_insert_delayed_threads=0*/
1409 Query /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/
1409 Query BINLOG ' gjTaUg/IAAAAZgAAAGoAAAAAAAQANS4xLjM4LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAUwAEGg
gAAAAICAgC '
1409 Query SET TIMESTAMP=1390032004
1409 Query SET @@session.pseudo_thread_id=4590896
1409 Query SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1
1409 Query SET @@session.sql_mode=1344274432
1409 Query SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1
1409 Query SET NAMES utf8
1409 Query /*!*/
1409 Query SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=33
1409 Query SET @@session.time_zone='SYSTEM'
1409 Query SET @@session.lc_time_names=0
1409 Query SET @@session.collation_database=DEFAULT
1409 Query BEGIN
1409 Query SET INSERT_ID=970245
1409 Query SELECT DATABASE()
1409 Init DB soccergame
1409 Query SET TIMESTAMP=1390032004
1409 Query INSERT IGNORE INTO `history` (`lid`, `ie`, `meid`, `ped`, `Xp`, `dre`, `te`) VALUES ('2', '201401186', '8', '
1', '7','O',O')
看看怎么办能删除?