Permalink
Browse files

[1.2.X] Fixed #12343 -- Added support for connection-by-socket to MyS…

…QL using the dbshell management command. Thanks to elyon001@gmail.com for the report, and sfllaw for the patch.

Backport of r13660 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent af0e321 commit 6fbd860fa890dff3226ddeac9e62c52af6e792e1 @freakboy3742 freakboy3742 committed Aug 28, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/db/backends/mysql/client.py
@@ -24,7 +24,10 @@ def runshell(self):
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:

0 comments on commit 6fbd860

Please sign in to comment.