diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-08-28 13:20:11 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-08-28 13:20:11 +0000 |
| commit | 6fbd860fa890dff3226ddeac9e62c52af6e792e1 (patch) | |
| tree | 7dd2c93331b29998212acf876f3a17153b4bad14 | |
| parent | af0e3217ae4d2e34de7bb90cd84f4ceff48a327e (diff) | |
[1.2.X] 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.
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
| -rw-r--r-- | django/db/backends/mysql/client.py | 5 |
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: |
