mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-06 09:50:20 +00:00
self.unix_socket
This commit is contained in:
@@ -376,6 +376,7 @@ class AbstractDBConfigurator(AbstractConfigurator):
|
|||||||
AbstractConfigurator.__init__(self)
|
AbstractConfigurator.__init__(self)
|
||||||
self.mysql_host = 'localhost'
|
self.mysql_host = 'localhost'
|
||||||
self.mysql_port = 3306
|
self.mysql_port = 3306
|
||||||
|
self.unix_socket = "/var/run/mysqld/mysqld.sock"
|
||||||
|
|
||||||
self.use_existing_db = False
|
self.use_existing_db = False
|
||||||
|
|
||||||
@@ -568,7 +569,7 @@ class NewDBConfigurator(AbstractDBConfigurator):
|
|||||||
# accessed from localhost with unix socket. So we retry with
|
# accessed from localhost with unix socket. So we retry with
|
||||||
# localhost when failing with 127.0.0.1.
|
# localhost when failing with 127.0.0.1.
|
||||||
if self.mysql_host == '127.0.0.1':
|
if self.mysql_host == '127.0.0.1':
|
||||||
self.root_conn = self.check_mysql_user('root', password, unix_socket="/var/run/mysqld/mysqld.sock")
|
self.root_conn = self.check_mysql_user('root', password, unix_socket=self.unix_socket)
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
return password
|
return password
|
||||||
|
Reference in New Issue
Block a user