I use SQLite to maintain the database for my blog. It is annoying sometimes when I could be using the very much more powerful MySQL, but I’m too cheap to opt for the extra money to add that ability to account. I feel like using MySQL for a blog database is like trying to swat a fly with a bazooka. If it came free with my site hosting, sure, I would use it, but it costs more money, and if I ran a store, or did something more interesting then blogging I would use it. But I don’t.
So my choices for storing my database for my blog would be berkelyDB, or SQLite. I choose SQLite because it was installed and looked simpler to use. It has now caused me two headaches. One when installing the plugin that allows for threaded comments. That is what makes the “reply to this” link work. I had to learn all this specific syntax and crap to add columns to my database. It took a long time, and it sucked. Now, because of the way SQLite handles files, I had a “locked” database for several days. I actually had stuff I wanted to write about. But the damned thing wouldn’t let me post anything at all. So after a few hours of pouring over the internet I start to find some things out. Maybe the file was locked using an operating system call? Maybe the program wrote a lock bit into the file header? Can I copy the file to a backup file, then delete the old one, clearing an operating system file? (that didn’t work) Maybe I just suck at Unix/Linux/BSD? In the end, I get one little clue how to fix this “locked” database. After many “SQL Error: Database is locked” messages, and much hair pulling (which reminds me, I need a hair cut) I find on a page describing all the commands you can throw at this highly versatile database software, a command description. This description says something to the effect of “This command commits any data created to the database, writes it to the table, writes the file, unlocks the database and deletes the journal file.” Sure enough there is a file called mtdb-journal. mtdb is the name of my database. I deleted the stupid journal file, and it !Wala! The system is working again.
So, now this is officially documented, and in a couple of days will be on google, so any idiot like me who can’t figure out how to unlock his database when SQLite takes a crap, can now have one more simple option to try.
Sometimes I feel like a huge nerd when an array of google searches can’t fix my problem. You know it’s bad when your the first person on the net to break non-beta software. Maybe I’ll start typing all of my real life (read not computer) problems into google and see which ones it brings up links for that can help me fix them. Man, that idea sounds like a bad sermon refrence….I hope my Dad doesn’t read this.
Daniel says
OR you could be *normal* and just use livejournal like the rest of us and save yourself all that work and sanity 😛
BigCat says
This is getting old. I’m not switching to livejournal like the rest of you sheep. Where is the next cliff you are going to be led over you silly lemmings.
Dink says
but…but…Livejournal said there would be candy at the bottom of the cliff! Why would LJ lie to us?
Kristiana says
I think it’s cool that you manage your own database for your journal. That’s hardcore. And I’m saying that after having some experience w/ MySQL and databases this semester.
Maybe I’ll start typing all of my real life (read not computer) problems into google and see which ones it brings up links for that can help me fix them
ha ha…this was funny, but it’s reflective of how much we really do rely on google. good or bad, i’m not sure.
p.s. I wish email address wasn’t required to post. I don’t want bots getting it and spammimg me.
BigCat says
Thanks for the compliment, I’m glad someone appreciates my feable efforts to maintain my seperation from LJ (mostly because I built this before I knew about LJ and didn’t want to ditch it afterwards).
The site is super easy to maintain like 99.9% of the time, but every once in a while it gives me fits. This last bout was some random error that caused the database to lock up, not an ongoing thing that happens a lot.
The whole email thing can be easily avoided by throwing an underscore after the @, or that is what I do anyway. The other thing to do is to put a web address (maybe not your actual website, but just some address) and then it doesn’t display your email as a link, it just stores it in the comments database on my server (which is not public to the web) to make sure your not a spam bot. In the next version of MovableType they are implementing some new comment spamming protection features that will make it easy for people to post comments on my site, and easy for me to kill comment spam, which does happen, and is annoying to find and delete for me.