找到my.ini(Linux下是my.cnf)文件,在文件里加入下面两行:

log="F:/mysqllog/mysql.log"
log-bin="F:/mysqllog/logbin.log"

重新启动MySQL服务,即开启了log和log_bin日志。

相关文章: