@@ -376,6 +376,8 @@ func (cfg *Config) buildInitSql() []byte {
376376CREATE DATABASE IF NOT EXISTS %s;
377377DROP user IF EXISTS 'root'@'127.0.0.1';
378378GRANT ALL ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY '%s' with grant option;
379+ DROP user IF EXISTS 'root'@'%%';
380+ GRANT ALL ON *.* TO 'root'@'%%' IDENTIFIED BY '%s' with grant option;
379381DROP user IF EXISTS '%s'@'%%';
380382GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO '%s'@'%%' IDENTIFIED BY '%s';
381383DROP user IF EXISTS '%s'@'%%';
@@ -385,7 +387,7 @@ GRANT SUPER, PROCESS, RELOAD, CREATE, SELECT ON *.* TO '%s'@'%%' IDENTIFIED BY '
385387DROP user IF EXISTS '%s'@'%%';
386388GRANT ALL ON %s.* TO '%s'@'%%' IDENTIFIED BY '%s';
387389FLUSH PRIVILEGES;
388- ` , cfg .Database , cfg .RootPassword , cfg .ReplicationUser , cfg .ReplicationUser , cfg .ReplicationPassword ,
390+ ` , cfg .Database , cfg .RootPassword , cfg .RootPassword , cfg . ReplicationUser , cfg .ReplicationUser , cfg .ReplicationPassword ,
389391 cfg .MetricsUser , cfg .MetricsUser , cfg .MetricsPassword , cfg .OperatorUser , cfg .OperatorUser ,
390392 cfg .OperatorPassword , cfg .User , cfg .Database , cfg .User , cfg .Password )
391393
0 commit comments