#1481 closed enhancement (fixed)
[patch] Using alternate MySQL unix socket
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
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: | no | UI/UX: | no |
Description
Hi,
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 :)
Cheers,
Geert
Attachments (1)
Change History (4)
by , 19 years ago
Attachment: | mysql_base_unixsocket.diff added |
---|
comment:1 by , 19 years ago
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 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Using alternate UNIX Socket for MySQL