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 (后面这个是路径) 来监控