mysqldumpslow — Summarize Slow Query Log Files With  --read-from-remote-server  only,  mysqlbinlog  connects using a server ID of 0, which tells the server to disconnect after sending the last requested log file. With  --read-from-remote-server  and  --stop-never ,  mysqlbinlog  connects using a nonzero server ID, so the server does not disconnect after sending the last log file. The server ID is 1 by default, but this can be changed with  --connection-server-id . Thus, for the first two ways of requesting files, the server disconnects because  mysqlbinlog  specifies a server ID of 0. It does not disconnect if  --stop-never  is given because  mysqlbinlog  specifies a nonzero server ID. The MySQL slow query log contains information about queries that take a long time to execute (see Section 5.4.5, “The Slow Query Log” ).  mysqldumpslow  parses MySQL slow query log files and summarizes their contents. Normally,  mysqldumpslow  groups queries that are similar except for the particular values of number and string data values. It “abstracts”  these values to  N  and  ’S’  when displaying summary output. To modify value abstracting behavior, use the  -a  and  -n  options. Invoke  mysqldumpslow  like this: mysqldumpslow [ options ] [ log_file  ...] Example output with no options given: mysqldumpslow  supports the following options. Table 4.23 mysqldumpslow Options 625 Option Name Description -a Do not abstract all numbers to N and strings to ’S’ -n Abstract numbers with at least the specified digits --debug Write debugging information -g Only consider statements that match the pattern --help Display help message and exit -h Host name of the server in the log file name -i Name of the server instance -l Do not subtract lock time from total time -r Reverse the sort order -s How to sort output -t Display only first num queries Reading mysql slow query log from /usr/local/mysql/data/mysqld80-slow.log Count: 1 Time=4.32s (4s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost  insert into t2 select * from t1 Count: 3 Time=2.53s (7s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost  insert into t2 select * from t1 limit N Count: 3 Time=2.13s (6s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost  insert into t1 select * from t1 4.6.10 mysqldumpslow — Summarize Slow Query Log Files