跟踪数据

set global general_log=on;   打开查询功能(用完记得关掉)

mysql> show variables like 'general_log_file'; 找到查询日志的位置


( show variables like 'log_error';             错误日志的位置
 show variables like 'slow_query_log_file';       慢查询日志的位置) 


使用:tail -f /tmp/mysqls.log | grep xxx (后面这个是路径) 来监控
posted @ 2017-01-24 11:07  糖饼好吃  阅读(151)  评论(0编辑  收藏  举报