Skip to content

Commit 9f3b113

Browse files
ameceacalind
authored andcommitted
Fixes #77 by not using hardcoded db name.
1 parent 9469812 commit 9f3b113

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/mysql-helper/apphelper/apphelper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ func configureOrchestratorUser() error {
9292
query := fmt.Sprintf(`
9393
SET @@SESSION.SQL_LOG_BIN = 0;
9494
GRANT SUPER, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT, RELOAD ON *.* TO '%[1]s'@'%%' IDENTIFIED BY '%[2]s';
95-
GRANT SELECT ON meta.* TO '%[1]s'@'%%';
95+
GRANT SELECT ON %[3]s.* TO '%[1]s'@'%%';
9696
GRANT SELECT ON mysql.slave_master_info TO '%[1]s'@'%%';
97-
`, tb.GetOrcUser(), tb.GetOrcPass())
97+
`, tb.GetOrcUser(), tb.GetOrcPass(), tb.ToolsDbName)
9898

9999
if err := tb.RunQuery(query); err != nil {
100100
return fmt.Errorf("failed to configure orchestrator (user/pass/access), err: %s", err)

0 commit comments

Comments
 (0)