summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/client.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-08-28 13:17:50 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-08-28 13:17:50 +0000
commit1b7fcf4758c8f21b63da75c6844949cb640f14a3 (patch)
tree16b10dd3f6ac07380feda9cbb74cad701fe4ce3c /django/db/backends/mysql/client.py
parent120070ed47afb9507c4cd934cbb67ed6bf5dadcb (diff)
downloaddjango-1b7fcf4758c8f21b63da75c6844949cb640f14a3.tar.gz
Fixed #12343 -- Added support for connection-by-socket to MySQL using the dbshell management command. Thanks to elyon001@gmail.com for the report, and sfllaw for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/mysql/client.py')
-rw-r--r--django/db/backends/mysql/client.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/backends/mysql/client.py b/django/db/backends/mysql/client.py
index ff5b64d1e0..24dc642abe 100644
--- a/django/db/backends/mysql/client.py
+++ b/django/db/backends/mysql/client.py
@@ -24,7 +24,10 @@ class DatabaseClient(BaseDatabaseClient):
if passwd:
args += ["--password=%s" % passwd]
if host:
- args += ["--host=%s" % host]
+ if '/' in host:
+ args += ["--socket=%s" % host]
+ else:
+ args += ["--host=%s" % host]
if port:
args += ["--port=%s" % port]
if db: