MYSQL中有6中不同的日志:
错误日志(Error log)
more XXX.err
二进制日志(Binary log)
mysql/bin/mysqlbinlog -vv binlog.XXXX1
日志闪回
查询日志(General Query log)
show variables like 'general_log'
set global general_log=ON
more XXXXX.log
慢查询日志(Slow query log)
more XXX-slow.log
set global long_query_time=2
mysqldumpslow XXX-slow.log
pt-query-digest分析
安装Anemometer:http://blog.itpub.net/30201474/viewspace-1839921/
中继日志(Relay log)
元数据日志(DDL log)