diff --git a/build/common/commands/new.py b/build/common/commands/new.py index 0db5616c..82c0ab7b 100644 --- a/build/common/commands/new.py +++ b/build/common/commands/new.py @@ -73,7 +73,7 @@ def main(): os.system(command) # Grant permission to database - command = mysql_command + "\"GRANT ALL PRIVILEGES ON `{db_name}`.* TO '{db_name}'@'%'; FLUSH PRIVILEGES;\"".format( + command = mysql_command + "\"GRANT ALL PRIVILEGES ON \`{db_name}\`.* TO '{db_name}'@'%'; FLUSH PRIVILEGES;\"".format( db_name=site_config.get('db_name') ) os.system(command) diff --git a/build/common/commands/restore_backup.py b/build/common/commands/restore_backup.py index 341849cd..1c098157 100644 --- a/build/common/commands/restore_backup.py +++ b/build/common/commands/restore_backup.py @@ -60,13 +60,13 @@ def restore_database(files_base, site): ) # drop db if exists for clean restore - drop_database = mysql_command + "\"DROP DATABASE IF EXISTS `{db_name}`;\"".format( + drop_database = mysql_command + "\"DROP DATABASE IF EXISTS \`{db_name}\`;\"".format( db_name=site_config.get('db_name') ) os.system(drop_database) # create db - create_database = mysql_command + "\"CREATE DATABASE IF NOT EXISTS `{db_name}`;\"".format( + create_database = mysql_command + "\"CREATE DATABASE IF NOT EXISTS \`{db_name}\`;\"".format( db_name=site_config.get('db_name') ) os.system(create_database) @@ -86,7 +86,7 @@ def restore_database(files_base, site): os.system(set_user_password) # grant db privileges to user - grant_privileges = mysql_command + "\"GRANT ALL PRIVILEGES ON `{db_name}`.* TO '{db_name}'@'%'; FLUSH PRIVILEGES;\"".format( + grant_privileges = mysql_command + "\"GRANT ALL PRIVILEGES ON \`{db_name}\`.* TO '{db_name}'@'%'; FLUSH PRIVILEGES;\"".format( db_name=site_config.get('db_name') ) os.system(grant_privileges)