From 651f7ca571e4b5275368402a56afdcde8e5443f6 Mon Sep 17 00:00:00 2001 From: "shital.rtcamp" Date: Mon, 23 Feb 2015 16:56:24 +0530 Subject: [PATCH] fixed query error vimbadmin and roundcubmail in stack.py --- ee/cli/plugins/stack.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 848436a0..a1dda0ed 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -887,10 +887,12 @@ class EEStackController(CementBaseController): Log.debug(self, "Creating vimbadmin database if not exist") EEMysql.execute(self, "create database if not exists" " vimbadmin") - Log.debug(self, "Granting all privileges on vimbadmin.* to " - "vimbadmin@root IDENTIFIED BY password ") - EEMysql.execute(self, "grant all privileges on vimbadmin.* to" - " vimbadmin@{0} IDENTIFIED BY" + Log.debug(self, " grant all privileges on `vimbadmin`.* to" + " `vimbadmin`@`{0}` IDENTIFIED BY" + " ' '".format(self.app.config.get('mysql', + 'grant-host'))) + EEMysql.execute(self, "grant all privileges on `vimbadmin`.* " + " to `vimbadmin`@`{0}` IDENTIFIED BY" " '{1}'".format(self.app.config.get('mysql', 'grant-host'), vm_passwd), errormsg="Cannot grant " @@ -1021,10 +1023,14 @@ class EEStackController(CementBaseController): Log.debug(self, "Creating Database roundcubemail") EEMysql.execute(self, "create database if not exists " " roundcubemail") - Log.debug(self, "Grant all privileges on roundcubemail") + Log.debug(self, "grant all privileges" + " on `roundcubemail`.* to " + " `roundcube`@`{0}` IDENTIFIED BY " + "' '".format(self.app.config.get( + 'mysql', 'grant-host'))) EEMysql.execute(self, "grant all privileges" - " on roundcubemail.* to " - " roundcube@{0} IDENTIFIED BY " + " on `roundcubemail`.* to " + " `roundcube`@`{0}` IDENTIFIED BY " "'{1}'".format(self.app.config.get( 'mysql', 'grant-host'), rc_passwd))