Actually just found the solution, so will leave this question up for others who run into this issue.
Turns out the mysql-bin files I was looking are not storing database data — though, in a way, they technically are (I'll get back to that in a sec).
These are mysql log files. Mysql by default is set to log every query issued to the server:
http://dev.mysql.com/doc/refman/5.0/en/binary-log.html
Mysql starts a new log file when mysql is restarted or when a log reaches a certain size. For those of us who have had the same XAMPP installation for a while, it could mean
a lot of files. I had > 100.
Because mysql logs every query, if you're regularly importing large databases (like I am), your logs can get huge quickly. Technically these logs are there for backup, and well, logging, but for all intents and purposes, they're huge sql dump files. That is, if you're importing a database from a sql file, the contents of that file are effectively stored indefinitely in your mysql logs. You can delete the original sql dump, but you are also, whether you know it or not, storing exactly the same data elsewhere [insert security concerns here].
For me, this is primarily a disk space concern. I got back ~6GB by getting rid of old logs.
Here are 2 excellent articles I found about the subject:
http://systems.takizo.com/2009/08/23/how-to-remove-mysql-binary-log/
http://legroom.net/2008/06/29/flush-and-reset-mysql-binary-logs
I followed takizo's advice for purging logs up to a certain date, which I repeat here, for simplicity:
- Code: Select all
shell> mysql -u username -p
mysql> PURGE BINARY LOGS BEFORE '2011-09-01 00:00:00';
Note, this problem can be avoided altogether, apparently, by pasting this into your my.cnf and restarting mysql:
- Code: Select all
expire_logs_days = 7
and, of course, set that to however many days you're comfortable with. Not enough time has passed to adequately test it myself, but both of the above sources recommend it.
I got 6GB free out of this. Not too shabby.