windows 啟用mysql二進位日誌

來源:互聯網
上載者:User

windows 啟用mysql二進位日誌

1。啟用二進位日誌

更改my.ini

找到[mysqld]部分,輸入以下命令

 

#啟用二進位日誌

server-id = 1

log-bin = e:/mysqlbin/binlog.log  

log-bin-index = e:/mysqlbin/binlog.index

 

重啟mysql

 

mysql> show variables like "log_%";

+---------------------------------+----------------+

| Variable_name                   | Value          |

+---------------------------------+----------------+

| log_bin                         | ON             |

| log_bin_trust_function_creators | OFF            |

| log_error                       | .\ts17-113.err |

| log_slave_updates               | OFF            |

| log_slow_queries                | OFF            |

| log_warnings                    | 1              |

+---------------------------------+----------------+

 

可以看到log_bin已經啟用

e:/mysqlbin/下出現兩個檔案

binlog.000001

binlog.index

 

2。查看二進記錄檔

show binary logs;

show master logs;

 

3.匯出記錄檔

mysqlbinlog -uroot -p E:\mysqlbin\binlog.000001 >d:\test.sql

 

參考文章

window 下 mysql 啟動 二進位記錄檔

http://blog.csdn.net/uvyoaa/article/details/6550685

MySQL啟用二進位日誌實戰示範

http://database.51cto.com/art/201006/204642.htm

【mysql效能log分析工具】

http://hi.baidu.com/xhl_tips/blog/item/95de63dff2e68014495403b1.html

轉:http://www.cnblogs.com/foxhengxing/archive/2011/07/04/2097509.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.