Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#1481 closed enhancement (fixed)

[patch] Using alternate MySQL unix socket

Reported by: Geert Vanderkelen <geert@…> Owned by: adrian
Component: Database layer (models, ORM) Version: magic-removal
Severity: normal Keywords: mysql socket unix_socket
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:



Attached a patch which allows an alternate UNIX socket to be used for MySQL. The default is /tmp/mysql.sock, but this is mostly changed to a path like /var/run/mysql or /var/lib/mysql in production.

I have made it so that when DATABASE_HOST starts with a '/' it is a socket, otherwise it's a HOST. This might not work on Windows, but heck, who's using namedpipes anyway :)



Attachments (1)

mysql_base_unixsocket.diff (768 bytes) - added by Geert Vanderkelen <geert@…> 10 years ago.
Using alternate UNIX Socket for MySQL

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Geert Vanderkelen <geert@…>

Using alternate UNIX Socket for MySQL

comment:1 Changed 9 years ago by Roman

I found this patch very useful in some cases. I'm getting trouble using shared hosting with dedicated database where connections to MySQL db are establised via non standard socket like "/home/username/tmp/mysql-socket"

comment:2 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [2736]) magic-removal: Fixed #1481 -- Added support for using alternate MySQL Unix sockets. Thanks, Geert Vanderkelen

comment:3 Changed 8 years ago by anonymous


Note: See TracTickets for help on using tickets.
Back to Top