简体   繁体   English

MySQL常规和慢查询日志不起作用

[英]MySQL general and slow query logs not working

I am attempting to get table-based general and slow query-logging working on my local machine. 我试图在我的本地计算机上运行基于表的常规查询和缓慢查询日志记录。 It works alright to file, but I really prefer to go straight to a table so I can use numerous analysis queries I've written over the years. 可以很好地进行归档,但是我真的更喜欢直接进入表,这样我就可以使用多年来编写的许多分析查询。

Here's what I'm using for the slow query log 这是我用于慢查询日志的内容

SET GLOBAL slow_query_log = 'ON';
SET GLOBAL long_query_time = 0;
SET GLOBAL min_examined_row_limit = 0;
SET GLOBAL log_queries_not_using_indexes = 'ON';
SET GLOBAL log_slow_admin_statements = 'ON';

I made a video showing my attempt. 我拍了一段视频,展示了我的尝试。 I am using mysql 5.6.20 installed via boxen. 我正在使用通过boxen安装的mysql 5.6.20。 I previously was using mysql 5.5.20 which seemed to work alright. 我以前使用的是MySQL 5.5.20,它似乎可以正常运行。 It's been a while since I've upgraded, so I can't be 100% that chance is what broke it, but it is likely. 自升级以来已经有一段时间了,所以我不能100%打破它的机会,但这很可能。

I have attempted rebooting, and uninstalling/reinstalling. 我试图重新启动,然后卸载/重新安装。

http://screencast.com/t/mrpJMDzYjSp http://screencast.com/t/mrpJMDzYjSp

By default the log_output goes to the FILE. 默认情况下,log_output进入FILE。 you need to explicitly set log_output variable: log_output=TABLE 您需要显式设置log_output变量:log_output = TABLE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM