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:
@@ -219,7 +219,7 @@ def setupdatabase(self, data):
|
|||||||
Log.debug(self, "Setting up user privileges")
|
Log.debug(self, "Setting up user privileges")
|
||||||
try:
|
try:
|
||||||
WOMysql.execute(self,
|
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,
|
.format(wo_db_name,
|
||||||
wo_db_username, wo_mysql_grant_host))
|
wo_db_username, wo_mysql_grant_host))
|
||||||
except StatementExcecutionError:
|
except StatementExcecutionError:
|
||||||
|
|||||||
Reference in New Issue
Block a user