Categories: "Devices"

How to manage MySQL binary log space (Debian)

So it turns out that what is filling up my root partition is my MySQL binary logs.

A collection of fat files in /var/log/mysql ...

So I had several options:

  • Move the logs to a different partition
  • Increase the size of the root partition
  • Decrease the size of the logs

The first option is probably the most reasonable one. But since I had other plans for the evening I actually went with the last option: decreasing the size of the logs! :roll:

The magic conf is located in /etc/mysql/my.cnf and the magic line is:


expire_logs_days = 5

It was set to 10 but I have no idea why I even need 5 days. Aren't those logs only useful until transactions commit to disk, and replication executes. Oh maybe if you have replicated slaves more than 5 days behind the master??

Edit 2009: You can purge the logs up to a specific file with a statement like this:


PURGE BINARY LOGS TO 'mysql-bin.000666';

Why is my Linux root partition full?

Oh my... nothing puts a server down on its knees more than a root partition with 0% free space. Oh well, ok, maybe being dugg beats it. But still, when you have a full partition, you're in trouble...

First thing is to find what is using that much space. My best bet is to do this:

cd /
du -s *

You may also like du -sh * which will show human readable sizes.

Then you just need to cd into the largest dir and iterate... ;)

About Apple Design

"Apple's design is supposed to be the ultimate perfection in 21st century computing. We should all learn from them."

I get that a lot when discussing b2evolution's user interface (which, btw, I like to think has improved significantly in version 2.0...)

While I do like what Apple does; while I do think Jonathan Ive is one of the greatest designers of our time; I still need to rant a little before I dive into the present day :>

So here's the top 5 user interaction design "mistakes" I would never have made if I has the final word at Apple's:

  1. A mouse where you never really know when you're going to left or right click, unless you really pay attention;
  2. An iPod that requires up to ten keypresses to exit shuffle mode while listening to a playlist;
  3. A mouse that gives Windows switchers a hard time with no control over acceleration, not even in the most obscure hidden place of the control panel. (Not even from the command line actually);
  4. A wireless keyboard with no numpad (not even an option);
  5. A battery you cannot replace, not even by turning one single screw. (How comes they got that right on the iMacs?)

And I won't even start with the marketing decisions (leaving a lot of features out of the iPod touch, etc.)

Of course, I'd make a lot more other mistakes, but still... Besides what's the use of a personal blog if not for pointless rants... :P

How to improve the mouse speed on Mac OS X

Ok, I've been annoyed by this since the very first day I've been using my Mac Mini: the mouse feels weird, very weird. Broken actually!

Part of my problem was the Bluetooth operating range, which I could only fix by moving the mac nearer to where I usually use my mouse in my living room.

However, the core problem is still the acceleration curve. When you move the mouse on OSX, it first moves verrrry slowly, so you move it faster and when you reach a certain speed the mouse suddenly accelerates like crazy.

This is not controllable through the "tracking speed" slider in the control panel. The tracking speed is only the fastest the mouse will go. (And you can actually make it go even faster!) But my problem is not with how fast it would eventually get. My problem is with how freaking slow it initially starts (even at max traking speed).


Apple's been stubbornly unresponsive to this problem, as they always are, especially when the mouse is at stake (took them 10 years to aknowlege the need for a right button... good luck with acceleration!)

Fortunately, since the last time I checked (errr... 2005 :roll:), third party fixes now work well on intel Macs.

Check these out:

  • USB Overdrive (no bluetooth support, but you can try it as long as you need)
  • SteerMouse (15 days trial only but it can handle the bluetooth Mighty mouse)

Since I'm trying to do some desk work right now and have a wired mouse, I'm currently and happily using USB Overdrive with these settings:

  • Speed: 120 dpi (feels like Windows fast ;))
  • Acceleration: 50% (no longer feels like sticking to the mouse pad ;))

I'll try SteerMouse when I go back to "Media Player" configuration...

How to open Windows Explorer with the Folders shown

Dammit, I had this at the time I was using Windows 2000 and I don't understand how I beared living without it ever since. My life just got better, again ;)

Here's what you need if you want a shortcut to open the Explorer on a given folder (for example: D:\www\), with the Folders pane open (which standard shortcuts don't open):

C:\WINDOWS\explorer.exe /e,D:\www\