1.首先确认你日志是否启用了
mysql>show variables like 'log_bin';
2.如果启用了,即ON
那日志文件就在mysql的安装目录的data目录下
3.怎样知道当前的日志
mysql> show master status;
4.看二进制日志文件用mysqlbinlog
shell>mysqlbinlog mail-bin.000001
shell>mysqlbinlog mail-bin.000001 | tail
mysql有以下几种日志:
错误日志: -log-err
查询日志: -log
慢查询日志: -log-slow-queries
更新日志: -log-update
二进制日志: -log-bin
在mysql的安装目录下,打开my.ini,在后面加上上面的参数,
保存后重启mysql服务就行了。
#Enter a name for the binary log. Otherwise
a default name will be used.
#log-bin=
#Enter a name for the query log file.
Otherwise a default name will be used.
#log=
#Enter a name for the error log file.
Otherwise a default name will be used.
log-error=
#Enter a name for the update log file.
Otherwise a default name will be used.
#log-update=
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9879835/viewspace-1000376/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9879835/viewspace-1000376/