Because of the existence of mysql-bin.0000X log files, often lead to a database file is not big but can generate a few G above the log file, the following will teach you to delete the mysql-bin.0000X log file method.
[Root @ jiucool var] #/usr/local/mysql/bin/mysql-u root-p
Enter password: (Enter the password)
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 264001
Server version: 5.1.35-log Source distribution
Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.
Mysql> reset master; (clear log files)
Query OK, 0 rows affected (8.51 sec)
Mysql>
Now, let's check the space occupied by the mysql folder?
[Root @ jiucool var] # du-h-max-depth = 1/usr/local/mysql/
37 M/usr/local/mysql/var
70 M/usr/local/mysql-test
15 M/usr/local/mysql/lib
448 K/usr/local/mysql/include
2.9 M/usr/local/mysql/share
7.6 M/usr/local/mysql/libexec
17 M/usr/local/mysql/bin
11 M/usr/local/mysql/docs
2.9 M/usr/local/mysql/SQL-Example
163 M/usr/local/mysql/
Okay. Check that the entire mysql directory occupies 16 m! OK, no problem, since the mysql-bin.0000X Log File occupies such a large space, the significance of existence is not particularly large, so we won't let it generate it.
[Root @ jiucool var] # find/-name my. cnf
Find my. cnf, which is the mysql configuration file. Comment out log-bin = mysql-bin.
# Replication Master Server (default)
# Binary logging is required for replication
# Log-bin = mysql-bin
Restart mysql.
OK, now, the delete mysql-bin.0000X log file operation is complete. It will not be because of dozens of M database size to generate N G log files.
Mysql Log File description
Tips for compressing MySQL Data Files
MySQL database table Representation
How to change the MySQL Data File Path
Copying a table structure in MySQL