From 5cb8f8315c84e441c7aed5acefe8d744c92e3ea4 Mon Sep 17 00:00:00 2001 From: shuijing198799 Date: Mon, 17 Feb 2020 10:40:11 +0800 Subject: [PATCH] tidb-initializer:close connection after set privilege --- pkg/manager/member/template.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/manager/member/template.go b/pkg/manager/member/template.go index 9c33dd5d67..493c1996d8 100644 --- a/pkg/manager/member/template.go +++ b/pkg/manager/member/template.go @@ -294,6 +294,7 @@ if permit_host != '%%': conn.cursor().execute("update mysql.user set Host=%s where User='root';", (permit_host,)) conn.cursor().execute("flush privileges;") conn.commit() +conn.close() `)) type TiDBInitStartScriptModel struct {