MySQL的二進(jìn)制日志(binary log)是一個(gè)二進(jìn)制文件,主要用于記錄修改數(shù)據(jù)或有可能引起數(shù)據(jù)變更的MySQL語句。二進(jìn)制日志(binary log)中記錄了對(duì)MySQL數(shù)據(jù)庫執(zhí)行更改的所有操作,并且記錄了語句發(fā)生時(shí)間、執(zhí)行時(shí)長、操作數(shù)據(jù)等其它額外信息,但是它不記錄SELECT、SHOW等那些不修改數(shù)據(jù)的SQL語句。二進(jìn)制日志(binary log)主要用于數(shù)據(jù)庫恢復(fù)和主從復(fù)制,以及審計(jì)(audit)操作。
官方文檔關(guān)于二進(jìn)制日志(binary log)的介紹如下:
The binary log contains “events” that describe database changes such as table creation operations or changes to table data. It also contains events for statements that potentially could have made changes (for example, a DELETE which matched no rows), unless row-based logging is used. The binary log also contains information about how long each statement took that updated data. The binary log has two important purposes:
· For replication, the binary log on a master replication server provides a record of the data changes to be sent to slave servers. The master server sends the events contained in its binary log to its slaves, which execute those events to make the same data changes that were made on the master. See Section 17.2, “Replication Implementation”.
延伸閱讀
- ssh框架 2016-09-30
- 阿里移動(dòng)安全 [無線安全]玩轉(zhuǎn)無線電——不安全的藍(lán)牙鎖 2017-07-26
- 消息隊(duì)列NetMQ 原理分析4-Socket、Session、Option和Pipe 2024-03-26
- Selective Search for Object Recognition 論文筆記【圖片目標(biāo)分割】 2017-07-26
- 詞向量-LRWE模型-更好地識(shí)別反義詞同義詞 2017-07-26
- 從棧不平衡問題 理解 calling convention 2017-07-26
- php imagemagick 處理 圖片剪切、壓縮、合并、插入文本、背景色透明 2017-07-26
- Swift實(shí)現(xiàn)JSON轉(zhuǎn)Model - HandyJSON使用講解 2017-07-26
- 阿里移動(dòng)安全 Android端惡意鎖屏勒索應(yīng)用分析 2017-07-26
- 集合結(jié)合數(shù)據(jù)結(jié)構(gòu)來看看(二) 2017-07-26