mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-11 03:32:52 +00:00
fix unix_socket
This commit is contained in:
parent
09e170b7d5
commit
67c2c2512c
@ -478,11 +478,13 @@ Please choose a way to initialize seafile databases:
|
|||||||
|
|
||||||
def check_mysql_user(self, user, password, host=None, unix_socket=None):
|
def check_mysql_user(self, user, password, host=None, unix_socket=None):
|
||||||
print('\nverifying password of user %s ... ' % user, end=' ')
|
print('\nverifying password of user %s ... ' % user, end=' ')
|
||||||
kwargs = dict(host=host or self.mysql_host,
|
kwargs = dict(port=self.mysql_port,
|
||||||
port=self.mysql_port,
|
|
||||||
user=user,
|
user=user,
|
||||||
passwd=password,
|
passwd=password)
|
||||||
unix_socket=unix_socket)
|
if unix_socket:
|
||||||
|
kwargs['unix_socket'] = unix_socket
|
||||||
|
else:
|
||||||
|
kwargs['host'] = host or self.mysql_host
|
||||||
|
|
||||||
try:
|
try:
|
||||||
conn = pymysql.connect(**kwargs)
|
conn = pymysql.connect(**kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user