跟踪数据

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 (后面这个是路径) 来监控
原文地址:https://www.cnblogs.com/tangbinghaochi/p/6346684.html