1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-05 09:20:13 +00:00

Allow mysql root password to be empty.

E.g. The mysql root pw of mariadb on ubuntu 16.04 is empty.
This commit is contained in:
Shuai Lin
2016-11-14 10:55:30 +08:00
parent 1b3c13d827
commit df540c4730

View File

@@ -1337,7 +1337,7 @@ def check_params(args):
else:
db_config.seafile_mysql_userhost = db_config.validate_mysql_user_host(mysql_user_host)
if not mysql_root_passwd:
if not mysql_root_passwd and "MYSQL_ROOT_PASSWD" not in os.environ:
raise InvalidParams('mysql root password parameter is missing in creating new db mode')
db_config.root_password = db_config.validate_root_passwd(mysql_root_passwd)