Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ private static void initUserAccount(SystemConfig config) throws SQLException, IO

String metaDatabase = config.getMetaDbName();
String innerUser = config.getMetaDbUser();
String metaDbProp = config.getMetaDbProp();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you debuging cn?
I don't understand why these properties are useful here, casue they seems to be defalut settings..
截屏2022-12-08 12 18 46

String innerPasswd = PasswdUtil.genRandomPasswd(12);
String innerPasswdEnc = PasswdUtil.encrypt(innerPasswd);
config.setMetaDbPasswd(PasswdUtil.encrypt(innerPasswd));
Expand All @@ -182,7 +183,7 @@ private static void initUserAccount(SystemConfig config) throws SQLException, IO
metaDbAddr.getKey(),
metaDbAddr.getValue(),
rootDb,
"",
metaDbProp,
rootUser,
rootPasswd)) {

Expand Down Expand Up @@ -230,7 +231,7 @@ private static void createInnerUser(SystemConfig config, String addr, String pas
String sqlCreateUser = "CREATE USER %s IDENTIFIED WITH mysql_native_password BY '%s'";
String sqlGrantPrivileges = "GRANT ALL PRIVILEGES ON *.* TO %s";
String innerUser = config.getMetaDbUser();

String metaDbProp = config.getMetaDbProp();
Pair<String, Integer> ipPort = AddressUtils.getIpPortPairByAddrStr(addr);

String rootDb = "mysql";
Expand All @@ -241,7 +242,7 @@ private static void createInnerUser(SystemConfig config, String addr, String pas
ipPort.getKey(),
ipPort.getValue(),
rootDb,
"",
metaDbProp,
rootUser,
rootPasswd)) {

Expand Down