-1

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%

apernerjan
  • 11
  • 1
  • 4
  • 2
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) or [Database Administrators Stack Exchange](http://dba.stackexchange.com/) would be a better place to ask. – jww Sep 25 '18 at 14:12

1 Answers1

1

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/

Rick James
  • 135,179
  • 13
  • 127
  • 222