Home >Database >Mysql Tutorial >MYSQL启用和查看二进制日志_MySQL

MYSQL启用和查看二进制日志_MySQL

WBOY
WBOYOriginal
2016-06-01 13:31:221073browse

bitsCN.com

MYSQL启用和查看二进制日志

 

查看是否启用了日志mysql>show variables like 'log_bin';查看当前的日志mysql> show master status;看二进制日志文件用mysqlbinlogshell>mysqlbinlog mail-bin.000001

 

 

开启日志服务:

 

在MY.INI里,MYSQLD项下添加log-bin=mysql。

 

如果只对某个库进行日志文件记录,那么再添加binlog-do-db=test,这样就只记录test数据库的日志,而放弃其他的。

 

添加完后,重新启动MYSQL的服务,日志文件开始工作了.

 

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn