+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MySQL Mysql-bin is the operation log of the database.
For example, update a table, or delete some data, even if the statement does not have matching data, the command will be stored in the log file, also include the time of execution of each statement, also recorded in. This has the following two purposes:
1: Data recovery
If your database is out of order and you have a previous backup, you can look at the log file to find out which command caused your database to go wrong and try to recover the loss.
2: Synchronizing data between master and slave servers
All operations on the primary server are recorded in the log, which can be performed from the server to ensure two synchronizations.
Example:
When a single MySQL server service is used, the corresponding log-bin=/program/mysql/mysql-bin can be commented out, plus the "#" number
Then restart the MySQL service.
3: If the Mysql-bin file fills the disk, the database service does not start properly, and the Log-bin=/program/mysql/mysql-bin This option is configured in the My.cnf file, but uses a single database, when the view process MySQL program is still in, but the hint "Can ' t connect to local MySQL server through socket '/var/lib/mysql/ Mysql.sock ' (2) ";"
To the/program/mysql/directory, compress all the zip files containing the mysql-bin. Then delete the original file to start the MySQL service.
This article is from "Irene's Blog" blog, please be sure to keep this source http://adson10.blog.51cto.com/6283173/1924210
The pit of the Mysql-bin file that encountered MySQL