From e8b9710052a0aab28edf98593783323ccbee0a25 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Wed, 29 Apr 2020 14:03:11 +0530 Subject: [PATCH 1/2] fix: mysql error during set db password --- build/common/commands/new.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common/commands/new.py b/build/common/commands/new.py index 82c0ab7b..4771b21d 100644 --- a/build/common/commands/new.py +++ b/build/common/commands/new.py @@ -66,7 +66,7 @@ def main(): os.system(command) # Set db password - command = mysql_command + "\"UPDATE mysql.user SET authentication_string = PASSWORD('{db_password}') WHERE User = \'{db_name}\' AND Host = \'%\';\"".format( + command = mysql_command + "\"ALTER USER '{db_name}'@'%' IDENTIFIED BY '{db_password}'; FLUSH PRIVILEGES;\"".format( db_name=site_config.get('db_name'), db_password=site_config.get('db_password') ) From 8ac55c86f9ab72fbfded3d3cdc5cc9015a3ebe82 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Wed, 29 Apr 2020 14:03:28 +0530 Subject: [PATCH 2/2] fix: always disable maintenance mode after migration --- build/common/commands/migrate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/common/commands/migrate.py b/build/common/commands/migrate.py index 70471981..06280a0f 100644 --- a/build/common/commands/migrate.py +++ b/build/common/commands/migrate.py @@ -42,8 +42,8 @@ def migrate_sites(maintenance_mode=False): finally: frappe.destroy() - if maintenance_mode: - set_maintenance_mode(False) + # Disable maintenance mode after migration + set_maintenance_mode(False) def main():