MySql 打开慢查询
set global log_output='FILE';
SET GLOBAL slow_query_log = ON;
SET GLOBAL long_query_time = 1;
SET GLOBAL slow_query_log_file = "/usr/local/mysql/data/mysql-slow.log";
查看主从同步状态
show slave status\G
show processlist;
看主从同步状态
show variables like "%slow%";看参数