changeset 877:c786908b95ca

Use UNIX socket to connect to MySQL.
author Brian Neal <bgneal@gmail.com>
date Sat, 03 Jan 2015 10:55:45 -0600
parents 07e4622f7aef
children fb0d2871afa4
files sg101/settings/local.py sg101/settings/production.py
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sg101/settings/local.py	Sat Dec 27 12:53:22 2014 -0600
+++ b/sg101/settings/local.py	Sat Jan 03 10:55:45 2015 -0600
@@ -12,6 +12,9 @@
         'NAME': SECRETS['DB_NAME'],
         'USER': SECRETS['DB_USER'],
         'PASSWORD': SECRETS['DB_PASSWORD'],
+        'OPTIONS': {
+            'unix_socket': '/var/run/mysqld/mysqld.sock',
+        },
     },
 }
 
--- a/sg101/settings/production.py	Sat Dec 27 12:53:22 2014 -0600
+++ b/sg101/settings/production.py	Sat Jan 03 10:55:45 2015 -0600
@@ -14,6 +14,9 @@
         'NAME': SECRETS['DB_NAME'],
         'USER': SECRETS['DB_USER'],
         'PASSWORD': SECRETS['DB_PASSWORD'],
+        'OPTIONS': {
+            'unix_socket': '/var/run/mysqld/mysqld.sock',
+        },
     },
 }