Enable MySQL binary log in Windows

Source: Internet
Author: User

Enable MySQL binary log in Windows

1. Enable binary log

Change my. ini

Find [mysqld] and enter the following command

 

# Enable binary logs

Server-id = 1

Log-bin = E:/mysqlbin/BINLOG. Log

Log-bin-Index = E:/mysqlbin/BINLOG. Index

 

Restart 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 |

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

 

You can see that log_bin is enabled.

E:/mysqlbin/contains two files.

Binlog.000001

BINLOG. Index

 

2. View binary log files

Show binary logs;

Show Master logs;

 

3. Export log files

Mysqlbinlog-uroot-p e: \ mysqlbin \ binlog.000001> D: \ test. SQL

 

References

Start the binary log file in MySQL in window

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

Demo of enabling binary logs in MySQL

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

[MySQL performance log analysis tool]

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

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

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.