Ticket #12343: dbshell-over-socket.patch

File dbshell-over-socket.patch, 561 bytes (added by Simon Law, 15 years ago)
  • django/db/backends/mysql/client.py

    old new class DatabaseClient(BaseDatabaseClient)  
    2424        if passwd:
    2525            args += ["--password=%s" % passwd]
    2626        if host:
    27             args += ["--host=%s" % host]
     27            if '/' in host:
     28                args += ["--socket=%s" % host]
     29            else:
     30                args += ["--host=%s" % host]
    2831        if port:
    2932            args += ["--port=%s" % port]
    3033        if db:
Back to Top