Skip to main content

Using symbolic links for MySQL data files

Over a year ago, we had several servers configured for high traffic websites. A mispartioning resulted in /var becoming obscenely small, and it was only after MySQL crashed that we remembered this. We couldn’t afford more downtime if we dealt with the partition size problem, so I thought of quickly moving the data files into /home/mysql/{dbname} from /var/lib/mysql/{dbname} and create the symlink /var/lib/mysql/{dbname} -> /home/mysql/{dbname}.

I was not certain of the performance implications to this. I heard from a fellow Linux junkie here that there may be a slight penalties in terms of access speed, since /home was meant for generic read/write, whereas /var was accessed in a very quick manner. Gotta verify this. But for now, I dwell in the power of symbolic links.


Popular posts from this blog

Valentine Surprise

Each year, on Valentine's day, I usually surprise my darling wife with a letter/card, or a bouquet of roses. As it was a yearly thing, I knew she sort of expected these surprises; she'd look surprised, but I knew she wasn't really. Occasionally, she does get surprised. Like that time back in Cebu when I bought her a rather intricate bouquet of flowers. Her head spun when she found out how much I paid for it. Surprise! This year, however, is different. I was not able to prepare anything for her. I didn't get her anything, thinking that I'd just make up for it with dinner, or something. Yes, I didn't plan for this and I feel lousy actually. Last night, after my daughter gave me and my wife her home-made Valentine greeting cards, my wife started chiding me about what I was going to give her the next day. I gave her my usual "I'm not telling" smile and silently kicked myself. I wished I already had something ready, and I found myself already longing fo

Migs in the Office!

Miguel got real bored at home and wanted to go and meet his classmates. Since school doesn't start until the 7th, I decided to take him with me to the office. He immediately got busy with the miniclip games and ignored Mjolnir the whole time! [gallery type="rectangular" ids="3167,3166"]