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”.

延伸閱讀

學(xué)習(xí)是年輕人改變自己的最好方式-Java培訓(xùn),做最負(fù)責(zé)任的教育,學(xué)習(xí)改變命運(yùn),軟件學(xué)習(xí),再就業(yè),大學(xué)生如何就業(yè),幫大學(xué)生找到好工作,lphotoshop培訓(xùn),電腦培訓(xùn),電腦維修培訓(xùn),移動(dòng)軟件開發(fā)培訓(xùn),網(wǎng)站設(shè)計(jì)培訓(xùn),網(wǎng)站建設(shè)培訓(xùn)學(xué)習(xí)是年輕人改變自己的最好方式