Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use binlog in mysql

Shulou Source: shulou.com Published: 2022-05-31 10:55:24 09月23日 Update

Most people do not understand the knowledge points of this article "how to use binlog in mysql", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to use binlog in mysql" article.

1. For master-slave replication. In the master-slave structure, binlog is saved in relaylog as operation records sent from master to the slave,slave server and received from master.

2. Used for data backup. After the database backup file is generated, binlog saves the details of the database backup so that the next backup can start at the backup point.

Example

# at 12345 # 170708 9:24:02 server id 12345 end_log_pos 219 CRC32 0x30763ffe Anonymous_GTID last_committed=0 sequence_number=1 SET @ @ SESSION.GTID_NEXT= 'ANONYMOS219 # 170708 9:24:02 server id 12345 end_log_pos 313 CRC32 0x4d0140b3 Query thread_id=5 exec_time=0 error_code=0 SET timestamp 1499477042 CPG; SET @ @ session. SET @ @ session.foreign_key_checks=1, @ @ session.sql_auto_is_null=0, @ @ session.unique_checks=1, @ @ session.session.sqlharmmode1436549152; SET @ @ session.auto_increment_increment=1, @ session.autoimmune incrementalization offsetbacks; / *!\ C utf8 * / / * / SET @ @ session.session. Collationalization timestamp namespace: SET @ @ session.session. Collationalization database setting default clientholder; SET @ @ SESSION.GTID_NEXT= 'AUTOMATIC' / * added by mysqlbinlog * / / *! /; DELIMITER; # End of log file / *! 50003 / *! 50530 SET @ @ SESSION.PSEUDO_SLAVE_MODE=0*/; above is the content of this article about "how to use binlog in mysql". I believe you all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about it, please follow the industry information channel.

Tags: Content backup data master and slave database articles knowledge articles value information most examples that is data backups files logs more servers steps knowledge points Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology vpn Docker Xiaomi Shulou Information