Dec 13, 2017

Move Large Slow Query Log in MySQL

shell> sudo mv mysql-slow.log mysql-slow.old
(move to the same folder if there is enough space, or else takes longer time)
shell> mysqladmin flush-logs
(this will create a new log file)

To quickly reduce file size of the big file:

$ echo ""> mysql-slow.old

See also:

How to read big/large files in Linux