简体   繁体   中英

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. I previously was using mysql 5.5.20 which seemed to work alright. 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.

I have attempted rebooting, and uninstalling/reinstalling.

http://screencast.com/t/mrpJMDzYjSp

By default the log_output goes to the FILE. you need to explicitly set log_output variable: log_output=TABLE

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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