feature: support non-standard unix socket (#5724)

* Add support for custom MySQL unix-socket

* NULL must be lowercase!

* Naive edit of html/install.php

* fixup

* Refactor dbConnect
Use it everywhere

* $config needs to be global
Don't need to set $database_link

* small cleanups
This commit is contained in:
Tony Murray
2017-04-06 16:02:37 -05:00
committed by Neil Lathwood
parent 66d9d54f73
commit b1a414e785
15 changed files with 196 additions and 129 deletions

View File

@@ -92,6 +92,9 @@ db_port = int(config['db_port'])
if config['db_host'][:5].lower() == 'unix:':
db_server = config['db_host']
db_port = 0
elif config['db_socket']:
db_server = config['db_socket']
db_port = 0
else:
db_server = config['db_host']