Fix: GRANT works for all MySQL/MariaDB variants

Including AWS RDS MariaDB. See https://github.com/WordOps/WordOps/issues/263
This commit is contained in:
Hendy Irawan
2020-05-20 04:34:45 +07:00
committed by GitHub
parent e82985a7d0
commit 1d69c1ecf7

View File

@@ -219,7 +219,7 @@ def setupdatabase(self, data):
Log.debug(self, "Setting up user privileges")
try:
WOMysql.execute(self,
"grant all privileges on `{0}`.* to `{1}`@`{2}`"
"grant select, insert, update, delete, create, drop, references, index, alter, create temporary tables, lock tables, execute, create view, show view, create routine, alter routine, event, trigger on `{0}`.* to `{1}`@`{2}`"
.format(wo_db_name,
wo_db_username, wo_mysql_grant_host))
except StatementExcecutionError: