text + images + ideas = reading/writing + art/design + notions

« Dinner with Dad | Main | Making Snow in Huntington Beach »

Batteries and Databases or How to have a Lost Friday

The Silver Princess' battery was recently recalled by Apple and they kindly sent a new one. The new battery is performing admirably, lasting much longer without a charge than the old, but it has one flaw... it makes a lousy lap warmer. The old battery would warm your lap quite nicely and it would at times get quite hot, which is why I think it was recalled. Maybe it is time to turn on the house's heater...

Databases are funny things. They can be quite robust and tick along nicely with tons of posts and calls for a long time. Or they can crumble and corrupt out of nowhere for no reason. After last summer's database debacle on a private community blog, I will never use Word Press again (sorry to all WP fans, but WP without a database is a website with NO posts whatsoever. Thank God, for Movable Type's static pages). And after last summer's Word Press database meltdown, I religiously backup the databases for my Movable Type installations, even though I also back up the static files every month. Just to be safe.

Today, I was updating a client from Movable Type 3.15 to 3.33, and the upgrade script was not working, it got stuck or stalled on "Starting Upgrade...". I had backed up the mysql database to my computer beforehand and when the upgrade froze, I opened it to discover that the backup was corrupted. About half the tables and data were gone, with only a NULL in their places. Yikes!

After much googling to beseech the Oracle of the Internets how to fix the problem, I appeared to be up a creek. Luckily for me, I encourage most of my clients to spend the extra monthly payment and go with Pair.com as a hosting service. Today, it was a good thing. I called Pair, and the lovely gentleman in their Pittsburgh office was able to access one of Pair's mysql backups from last week and unzip it to get a good copy of my client's database. Thank you lovely tech support fellow! You rock.

Only one problem, since it was his first time doing this, he was unable to package it up as a .sql file for me, and now I have 51 .frm / .MYD / .MYI files that compose of the database. I have now spent over 5 hours trying to put Humpty Dumpty the database back together again.

Due to various access permissions beyond my control, I can back up my database, but I have been unable to restore it with the files from last week, even with PHPMyAdmin and MySQLAdmin. Unless a fellow(ess) Pair user and/or database guru can inform me how to get around my access denial and how to restore the database or how to take 51 separate files and merge them into one .sql (yes, I followed Alden Bates' instructions, and it didn't work), I will have to wait until Monday with the tech supervisor is back in the office and can hopefully do it for me.

And to think I was supposed to work on my online portfolio today... ;o)

| | Comments (1) | tech + web dev

1 Comments

Had the Pair guy not been such a noob, he would have restored the files to the MySQL data directory for you instead of delivering them to you. If you can get him (or someone else who knows better) to copy the files back to the MySQL data directory to the correct place you should have no problems accessing the database again.