how to enable MySQL query log?

来源:互联网 发布:eromangabox新域名 编辑:程序博客网 时间:2024/05/22 15:00

1、to enable the query log,put this in /etc/my.cnf in the [mysqld] section

log=/usr/local/mysql_query.log

2、this worked for me(Mysql 5.6.12 on windows),set parameter int the mysql console:

set global general_log=on;

set global general=1#(or 0 to disable)

set global  general_log_file='c:/mysql_query.log'

set global log_output='file'



linux下修改my.cnf如下:

[[mysqld]]general-loggeneral-log-file=queries.loglog-output=file


0 0
原创粉丝点击