Django mysql configuration

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘DB_NAME’,
‘USER’: ‘DB_USER’,
‘PASSWORD’: ‘DB_PASSWORD’,
‘HOST’: ‘localhost’, # Or an IP Address that your DB is hosted on
‘PORT’: ‘3306’,
}
}

Advertisements

Django Mysql Connection in Mac OS X

After installing

Python
Mysql-python
django

still u r not able to connect to db , please check below

Commands:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql

Reference:
http://stackoverflow.com/questions/6414407/mysqldb-error-when-running-python-server-on-macosx10-6