diff --git a/awsapi-setup/db/mysql/cloudbridge_db.sql b/awsapi-setup/db/mysql/cloudbridge_db.sql index 0a859035846..04ea41a75b9 100644 --- a/awsapi-setup/db/mysql/cloudbridge_db.sql +++ b/awsapi-setup/db/mysql/cloudbridge_db.sql @@ -3,8 +3,8 @@ SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI'; DROP DATABASE IF EXISTS cloudbridge; CREATE DATABASE cloudbridge; -GRANT ALL ON cloudbridge.* to `cloud`@`localhost`; -GRANT ALL ON cloudbridge.* to `cloud`@`%`; +GRANT ALL ON cloudbridge.* to cloud@`localhost` identified by 'cloud'; +GRANT ALL ON cloudbridge.* to cloud@`%` identified by 'cloud'; GRANT process ON *.* TO `cloud`@`localhost`; GRANT process ON *.* TO `cloud`@`%`; diff --git a/setup/bindir/cloud-setup-databases.in b/setup/bindir/cloud-setup-databases.in index 0504e897c88..9acb24d459f 100755 --- a/setup/bindir/cloud-setup-databases.in +++ b/setup/bindir/cloud-setup-databases.in @@ -242,6 +242,13 @@ for full help self.info(None, True) awsApiDbDir = '/usr/share/cloud/setup/bridge/db' + for f in ["cloudbridge_db"]: + p = os.path.join(awsApiDbDir,"%s.sql"%f) + if not os.path.exists(p): continue + text = file(p).read() + for t, r in replacements: text = text.replace(t,r) + file(p, 'w').write(text) + awsApiCmds = ['cd %s;'%awsApiDbDir, 'sh deploy-db-bridge.sh %s;'%self.rootpassword, 'cd -'] runCmd(awsApiCmds)