Skip to content

Commit b114681

Browse files
committed
ProxySQL ERROR 9001 (HY000) can not reconnect when bootstrap users and with custom writer hostgroup not 0 #455
1 parent b4f5399 commit b114681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

router/proxysql/proxysql.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (psql *ProxySQL) GetHostsRuntime() (string, error) {
250250
}
251251

252252
func (psql *ProxySQL) AddUser(User string, Password string) error {
253-
_, err := psql.Connection.Exec("REPLACE INTO mysql_users(username,password) VALUES('" + User + "','" + Password + "')")
253+
_, err := psql.Connection.Exec("REPLACE INTO mysql_users(username,password,default_hostgroup) VALUES('" + User + "','" + Password + "','" + psql.WriterHG + "')")
254254
if err != nil {
255255
return err
256256
}

0 commit comments

Comments
 (0)