Mysqlbinlog command use, binlog log backup restore

Source: Internet
Author: User

Recovery based on all libraries

Mysqlbinlog mysql-bin.000020 > All.sql #备份所有库


Recovery based on the specified library

mysqlbinlog-d wsyht mysql-bin.000020 > Wsyht.sql #备份wsyht库的备份语句,-D intercepts the binlog of the specified library

mysql-uroot-pwsyht123 < Wsyht.sql


Incremental recovery based on location points

Specify starting and ending positions

Mysqlbinlog mysql-bin.000020--start-position=510--stop-position-r pos.sql #-r equivalent redirect, intercept by location

Mysqlbinlog mysql-bin.000020--start-datetime= ' 2015-12-04 17:15:12 '--stop-datetime= ' 2015-12-04 17:18:12 '-R time.sql #按照时间截取


Turn on the Binlog feature

[[email protected] ~]# grep log-bin/etc/my.cnf

Log-bin=mysql-bin


Mysqlbinlog logs are used to record MySQL internal additions and deletions, and other updates to the MySQL database.



Hope to communicate with the technology can contact me by the following ways

My OPS group 517751492

My QQ1934844044.

This article is from the "Wsyht blog" blog, make sure to keep this source http://wsyht2015.blog.51cto.com/9014030/1719703

Mysqlbinlog command to use, Binlog log backup to restore

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.