Skip to content

Commit 43491aa

Browse files
authored
Merge pull request #32 from Icinga/mysql-8-compat
Fix compatibility with MySQL 8.0.0 to 8.0.13
2 parents 494ccd6 + d4ea836 commit 43491aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/services/mysql/root_connection.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ func (m *rootConnection) CreateMysqlDatabase() services.MysqlDatabaseBase {
5252
if err != nil {
5353
panic(err)
5454
}
55-
// SESSION_VARIABLES_ADMIN is only needed and supported on MySQL 8+, that magic comments only executes it there.
56-
_, err = m.db.Exec(fmt.Sprintf("/*!80000 GRANT SESSION_VARIABLES_ADMIN ON *.* TO %s */", username))
55+
// SESSION_VARIABLES_ADMIN is only needed and supported on MySQL 8.0.14+, that magic comments only executes it there.
56+
_, err = m.db.Exec(fmt.Sprintf("/*!80014 GRANT SESSION_VARIABLES_ADMIN ON *.* TO %s */", username))
5757
if err != nil {
5858
panic(err)
5959
}

0 commit comments

Comments
 (0)