From 40f104602fb49dd24b7599d6c5b2b243f2f9f400 Mon Sep 17 00:00:00 2001 From: xuriwuyun Date: Wed, 25 Dec 2024 20:36:25 +0800 Subject: [PATCH] fix: do not create kbadmin througth accountprovision (#8709) --- pkg/lorry/engines/mysql/user.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/lorry/engines/mysql/user.go b/pkg/lorry/engines/mysql/user.go index 69fd988a892..48550131dfd 100644 --- a/pkg/lorry/engines/mysql/user.go +++ b/pkg/lorry/engines/mysql/user.go @@ -116,7 +116,8 @@ func (mgr *Manager) DescribeUser(ctx context.Context, userName string) (*models. func (mgr *Manager) CreateUser(ctx context.Context, userName, password, statement string) error { if !strings.HasPrefix(statement, "CREATE ") { - return fmt.Errorf("the user %s is created with invalid sql %s, wait and try again", userName, statement) + mgr.Logger.Info("the user is created with invalid sql, just ignore", "user", userName, "sql", statement) + return nil } sql := fmt.Sprintf(createUserSQL, userName, password)