0

I have tried all options, suggested here and also on many other places but still cant get it working. Just out of curiosity, why is it so insanely difficult to get this thing working on mac. I am new to the platform and getting mysql and python bindings running have been a huge pain and makes me wonder why nothing more user friendly is available.

I am no hacker, just some one wanting to learn Django but caught up in this whole mysql-mac quandary.

Kartik Rustagi
  • 669
  • 2
  • 8
  • 16
  • 1
    The easiest way to do this is using something like [homebrew](http://mxcl.github.com/homebrew/), and I answered a similar type question here: http://stackoverflow.com/questions/7335853/mysql-python-installation-problems-on-mac-os-x-lion/7336998#7336998 – wkl Oct 15 '11 at 20:51

1 Answers1

0

It's pretty straightforward:

  1. Install MySQL client libraries (using MacPorts, downloading them from MySQL, compiling them yourself)
  2. Use easy_install to install MySQL-python: easy_install MySQL-python

Done. You could check if it was correctly installed with a plain python interpreter:

>>> import _mysql
>>> db=_mysql.connect("192.168.16.252","dbname","user","password")
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
  • 3
    If it were that easy, there wouldn't be the dozens and dozens of questions on this topic. There are many ways this can go wrong on OS X, especially 10.6 or 10.7, depending on which Python you started with and where you get the MySQL client from. There are too many variables: which architectures each component was built with, which OS X version the component's build was targeted for, even which C compiler was used. The easiest and most trouble-free way is to use MacPorts or homebrew or possibly Fink to supply *all* of the components including Python. – Ned Deily Oct 15 '11 at 21:03