MySQL database recovery (using mysqlbinlog command) _ MySQL
Source: Internet
Author: User
MySQL database recovery (using mysqlbinlog command) bitsCN. com1: enable binlog logging
Modify the mysql configuration file mysql. ini and add it under the [mysqld] node.
# Log-bin
Log-bin = E:/log/logbin. log
Do not include Chinese characters or spaces in the path. Restart the mysql service. Use command lines to stop and start mysql services
C:/> net stop mysql;
C:/> net start mysql;
Go to the command line to enter mysql and check whether the binary log has been started
SQL code
Mysql> show variables like 'log _ % ';
After the log is successfully enabled, the logbin. index and logbin.000001 files are created in the E:/log/directory. Logbin.000001 is the backup file of the database. you can use this file to restore the database.
2: view the backup binary file
SQL code
C:/mysql/bin/> mysqlbinlog e:/log/logbin.000001
More operations will be recorded in the future, and the command line method will basically not be used. You can view the log content by exporting the log file.
2.1 export
Xml code
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.