Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a lot of files in mysql data/ folder

files are named

  • off.000001
  • off.000002
  • etc.

What are those? Each takes 1.1 GB of space.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Those are binary logs not transaction logs.

Binary logs record completed SQL transactions.

Transaction logs (specifically ib_logfile0 and ib_logfile1) record SQL statements that are bulk committed upon transaction completion.

sql_log_off disables the general log, not the binary logs.

Binary logs are disabled by doing two things:

STEP 01) Comment out any line in my.cnf that has log_bin or log-bin

[mysqld]
#log-bin=off

It is easier just to delete log_bin or log-bin from my.cnf

STEP 02) You can either restart mysql or run this at the mysql command line

mysql> SET sql_log_bin = 0;

That's it !!!

From the name of the binary logs you probably have this:

[mysqld]
log-bin=off

That simply told mysqld to make binary logs named off

share|improve this answer
    
You're right. Thanks for the correction and +1 for the good explanation. –  Mihai Todor Aug 12 '12 at 17:43

They are the MySQL (transaction) logs. This page contains all the details on them and information on how to clean them up. You can also disable these logs, if you want, by setting the sql_log_off variable.

I stand corrected. I didn't research enough the answer I provided. Sorry for that. @RolandoMySQLDBA provides a good explanation for this question.

share|improve this answer
    
Yeah, i've found out myself, but those links you gave also helped. Anyway, I hope you don't mind if I reward correct answer to the guy who corrected you? :) –  egis Aug 12 '12 at 19:54
1  
Of course I don't mind. He deserves to receive it! :) –  Mihai Todor Aug 12 '12 at 19:58
1  
Thank you kindly, to both of you !!! Hey, sometimes I get it wrong (Example : dba.stackexchange.com/a/21477/877) –  RolandoMySQLDBA Aug 12 '12 at 22:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.