diff --git a/settings.py b/settings.py
index 32772a49ae96b552d626c07551d11bda367c1500..9a1a107989fc166fa569c1c2b29e01702ff708c2 100644
--- a/settings.py
+++ b/settings.py
@@ -1,6 +1,16 @@
 # Django settings for gracedb project.
 import os
 
+try:
+    # Workaround for a bug
+    # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473584
+    # http://bugs.python.org/setuptools/issue36
+    # import MySQLdb followed by import pkg_resources complains
+    #   /usr/lib/python2.6/dist-packages/pytz/__init__.py:32: UserWarning: Module _mysql was already imported from /usr/lib/pymodules/python2.6/_mysql.so, but /usr/lib/pymodules/python2.6 is being added to sys.path
+    import pkg_resources
+except:
+    pass
+
 DEBUG = False
 TEMPLATE_DEBUG = DEBUG
 
@@ -40,13 +50,14 @@ XMPP_ALERT_CHANNELS = [
                         'test_grb',
                       ]
 
-DATABASE_ENGINE = 'mysql'
-DATABASE_NAME = 'gracedb'
-DATABASE_USER = 'gracedb'
-DATABASE_PASSWORD = 'redrum4x'
-DATABASE_HOST = ''             # Set to empty string for localhost.
-DATABASE_PORT = ''             # Set to empty string for default.
-
+DATABASES = {
+    'default' : {
+        'NAME'     : 'gracedb',
+        'ENGINE'   : 'django.db.backends.mysql',
+        'USER'     : 'gracedb',
+        'PASSWORD' : 'redrum4x',
+    }
+}
 
 # SkyAlert
 
diff --git a/settings_dev.py b/settings_dev.py
index 21410556b53a058be3e697f0f7506c2fc2294eb6..f6ced5ab88e9338e384314a7a268e08b410e9fee 100644
--- a/settings_dev.py
+++ b/settings_dev.py
@@ -1,5 +1,16 @@
 # Django settings for gracedb project.
 
+try:
+    # Workaround for a bug
+    # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473584
+    # http://bugs.python.org/setuptools/issue36
+    # import MySQLdb followed by import pkg_resources complains
+    #   /usr/lib/python2.6/dist-packages/pytz/__init__.py:32: UserWarning: Module _mysql was already imported from /usr/lib/pymodules/python2.6/_mysql.so, but /usr/lib/pymodules/python2.6 is being added to sys.path
+    import pkg_resources
+except:
+    pass
+
+
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
 
@@ -27,14 +38,15 @@ XMPP_ALERT_CHANNELS = [
                         'test_cwb',
                         'test_lowmass',
                       ]
-
-DATABASE_ENGINE = 'mysql'
-DATABASE_NAME = 'gracedb'
-DATABASE_USER = 'gracedb'
-DATABASE_PASSWORD = 'redrum4x'
-DATABASE_HOST = ''             # Set to empty string for localhost.
-DATABASE_PORT = ''             # Set to empty string for default.
-
+ 
+DATABASES = {
+    'default' : {
+        'NAME'     : 'gracedb',
+        'ENGINE'   : 'django.db.backends.mysql',
+        'USER'     : 'gracedb',
+        'PASSWORD' : 'redrum4x',
+    }
+}
 
 # SkyAlert