From caa60b1d03c3f3544988593bb0c12362de5474a2 Mon Sep 17 00:00:00 2001 From: winebarrel Date: Tue, 28 Apr 2020 18:48:57 +0900 Subject: [PATCH] Fix grant db parse --- mysql/resource_grant.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/resource_grant.go b/mysql/resource_grant.go index dc946261..7ca27ced 100644 --- a/mysql/resource_grant.go +++ b/mysql/resource_grant.go @@ -485,7 +485,7 @@ func showGrants(db *sql.DB, user string) ([]*MySQLGrant, error) { } grant := &MySQLGrant{ - Database: strings.Trim(m[2], "`"), + Database: strings.ReplaceAll(m[2], "`", ""), Table: strings.Trim(m[3], "`"), Privileges: privileges, Grant: reGrant.MatchString(rawGrant),