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

Post a Comment

Featured Post

Updated Coupons / promo codes for Google Apps for Work / Business

To redeem: 1. Sign up for Google Apps   2. Go to your billing settings  3. Choose your payment plan  4. Enter your promo code ...