MySQL Binlog Server

Source: Internet
Author: User

Starting with version 5.6, you can use the Mysqlbinlog command to back up logs from a remote machine to a local directory, making it easier and faster to implement a Binlog server.

Environment Description: 192.168.56.100 is a backup server, 192.168.56.101 is a MySQL server that needs to be backed up binlog.

Key parameter Introduction:

The-r,--read-from-remote-server represents the read binlog from the remote MySQL server.

-raw stores logs in binlog format for later use.

The--stop-never connects to the remote MySQL server to read the log until the remote service shuts down, or is killed.

mysql-bin.*** represents the log from which to start the backup.

--stop-never-slave-server-id Mysqlbinlog is equivalent to the log from the main library, all need to Server-id to make a unique identity.

The operation is as follows:

Now 56.100 Create a binlog backup directory:

Mkdir-p/data/binlogbak

Perform remote replication Binlog command on 56.100 and start backup from mysql-binlog.00008

Mysqlbinlog--raw--read-from-remote-server--stop-never--host=192.168.56.101--port=3306--user=root--password=A a123456 mysql-binlog.00008

MySQL Binlog Server

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.