Mariadb mysql-slow-query.log

516 Views Asked by At

Can some one advise me about this:

OS: CentOS release 6.5 (Final)

MYsql: Ver 15.1 Distrib 5.5.38-MariaDB

9.1G /srv/mysql/mysql-slow-query.log

1.1G /srv/mysql/ib_logfile0

1.1G /srv/mysql/ib_logfile1

I have Maria db which has mysql-slow-query.log and it is 9.1G, So I don't have so mach space on my server to give for log. Can someone advise me what can i Do wit this, can I delete some lines in it or can i totally remove this log. Free space: 13G 17%

1

There are 1 best solutions below

0
Rick James On

Execute FLUSH SLOW LOGS;. I suspect that will not suffice. So...

mv the slow log to change its name, then do FLUSH SLOW LOGS;. Now you will have 2 files, the 9GB one and a freshly started one. rm the old one when you through with it.

I might suggest you grab the output of pt-query-digest before doing any of the above. After all, that's why you turned the slowlog on, correct?

https://mariadb.com/kb/en/library/flush/