title: libmysqlclient.18.dylib image not found when using MySQL from Django on OS X
body: <p>I'm starting down the path of learning Python/Django and have hit my first snag. When attempting to set my database in <code>settings.py</code>, the internal server fails with:</p>
  
  <pre><code>File "/Library/Python/2.7/site-packages/django/db/backends/mysql/base.py", line 16, in &lt;module&gt;
  raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
  django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/rob/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
  Referenced from: /Users/rob/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so
  Reason: image not found
  </code></pre>
  
  <p>There are a lot of solutions that I've found, mostly involving the explicit definition of my <code>DYLD_LIBRARY_PATH</code> value, but that doesn't work for me. <code>MysQL-Python</code> is installed (v1.2.3).</p>
  
  <p>Any idea what I might need to do to push through this?</p>
  
  <p>Thanks.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <pre><code>DATABASES = {
    'default': {
      'ENGINE': 'django.db.backends.mysql',  # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
      'NAME': 'django_tutorial',                      # Or path to database file if using sqlite3.
      'USER': 'root',                      # Not used with sqlite3.
      'PASSWORD': '',                  # Not used with sqlite3.
      'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
      'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }
  }
  </code></pre>