Python-MySQL Connections on Mac OS

Update: This entry has been updated for Snow Leopard.

In all of Mac-dom, there are few experiences more painful than trying to get Python tools to talk to a MySQL database. Installing MySQL itself is easy enough – Sun provides a binary package installer. Python 2.5 comes with Mac OS X. If you enable Apache and PHP, your PHP scripts will talk to your installed MySQL databases just fine, since PHP comes bundled with a MySQL database connector. But try to get up and running with Django, TurboGears, or any other Python package where MySQL database access could be useful (or needed), and you’re in for a world of hurt.

Update: I finally did manage to get Python and MySQL playing nice together, but it took a few more contortions beyond what’s described in the recipes found scattered around the interwebs. I’ve added my solution at the end of this post.

Continue reading “Python-MySQL Connections on Mac OS”

Kittens

Why having a 6-year-old around the house is the greatest experience in the world:

That’s not our house, but minute-to-minute life isn’t far off from this girl’s wonderful stream of consciousness existence.

25 Random Things About Me

I don’t generally “do” Facebook or chain letters, but lately a meme has been floating around — write a note including 25 random facts or observations about your life, and tag some people you know or used to know (that’s the viral part). Seems silly on the surface, but it’s actually a really neat little vehicle for an hour or two of life review. Finally took the plunge and wrote one of my own. Excerpts:

– In high school, made a good living cleaning boat bottoms, scuba diving upside down in water so dense with algae and brine shrimp you could barely see your hand in front of your face. Sea monkeys creeping under the mask and up your nose, scraping knuckles on barnacles. Loved that job, but would never do it today.

– God, I love Fritos.

– My 6-year-old son is one of the two most important people in my life (the other is my wife, of course). I relish every moment with him, can’t wait to see him in the evenings. We rock the weekends together, try to always have at least one adventure. He’s shaping up to be an amazing human being. I could drown in his laughter and die happy.

More