The pit of the Mysql-bin file that encountered MySQL

Source: Internet
Author: User

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.