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 used to manage Microsoft SQL Server installations. Now I'm up against a MySQL 5.1 server.

On MSSQL, I remember databases have transaction log files which grow larger and larger as transactions occur. If you don't truncate the files every now and then, you will eventually run out of disk space. So even if you compact your databases by deleting old rows, disk space will be running out.

I wonder if MySQL behaves similarly and what steps I need to take to make sure that disk space won't get depleted.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The same is true with MySQL (and any database server with logging) when you have binary logging enabled.

Check out the MySQL documentation regarding binary logging as it points out a number of variables that effect the size of the logs and how often they get rotated.

In addition the section on Log Maintenance will also be important to you.

share|improve this answer
    
Thanks. Do you know if binary logging is enabled by default? The docs appear to say all logging is off. –  Gruber Sep 28 '12 at 13:01
1  
I have found that whether binary logging is enabled by default is dependent upon every installation. If you have access to the mysql configuration file (usually /etc/my.cnf or /etc/mysql/mysql.cnf) you can grep for log-bin for it's value. –  KayakJim Sep 28 '12 at 13:04
1  
If you don't have access to the configuration file you could issue the command SHOW VARIABLES LIKE 'log_bin'; in the mysql client. –  KayakJim Sep 28 '12 at 13:05

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.