title: How do I install MySQL and the Python MySQL package on OS X Leopard? Or how do I learn about being a web developer using OS X?
body: <p>I'm new to the Mac OS X, and I'm just about ready to throw my brand new <a href="http://en.wikipedia.org/wiki/MacBook_Pro" rel="nofollow noreferrer">MacBook Pro</a> out the window. Every tutorial on setting up a Django development environment on <a href="http://en.wikipedia.org/wiki/Mac_OS_X_Leopard" rel="nofollow noreferrer">Mac&nbsp;OS&nbsp;X Leopard</a> is insidiously wrong. They are all skipping over one step, or assuming you have setup something one way, or are just assuming that I know one thing that I must not.</p>
  
  <p>I'm very familiar with how to setup the environment on Ubuntu/Linux, and the only part I'm getting stuck on with <a href="https://en.wikipedia.org/wiki/OS_X" rel="nofollow noreferrer">OS&nbsp;X</a> is how to install MySQL, autostart it, and install the Python MySQL bindings. I think my mistake was using a hodgepodge of tools I don't fully understand; I used fink to install MySQL and its development libraries and then tried to build the Python-MySQL bindings from source (but they won't build.)</p>
  
  <p>UPDATE:
  I installed the binary MySQL package from <a href="http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg" rel="nofollow noreferrer">http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg</a>, and I got MySQL server running (can access with admin.)
  The MySQL version I got from port was rubbish, I could not get it to run at all.</p>
  
  <p>I modified the source for the Python-MySQL package as per the answer I chose, but I still got compilation errors that I listed in the comments. I was able to fix these by adding /usr/local/mysql/bin/ to my path in my "~/.profile" file.
  "
  PATH=/usr/local/mysql/bin:$PATH
  "</p>
  
  <p>Thanks for the help, I was very wary about editing the source code since this operation had been so easy on Ubuntu, but I'll be more willing to try that in the future. I'm really missing Ubuntu's "apt-get" command; it makes life very easy and simple sometimes. I already have an Ubuntu <a href="http://en.wikipedia.org/wiki/VMware" rel="nofollow noreferrer">VMware</a> image running on my Mac, so I can always use that as a fallback (plus it more closely matches my production machines so should be a good test environment for debugging production problems.)</p>