From df540c4730dc0e32c2db117c87ea3dc46f9673fe Mon Sep 17 00:00:00 2001 From: Shuai Lin Date: Mon, 14 Nov 2016 10:55:30 +0800 Subject: [PATCH] Allow mysql root password to be empty. E.g. The mysql root pw of mariadb on ubuntu 16.04 is empty. --- scripts/setup-seafile-mysql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup-seafile-mysql.py b/scripts/setup-seafile-mysql.py index 8b81374..32390cf 100644 --- a/scripts/setup-seafile-mysql.py +++ b/scripts/setup-seafile-mysql.py @@ -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)