further permissions

This commit is contained in:
Usman Nasir
2020-08-26 15:06:05 +05:00
parent 7c211a85fd
commit 4cf8f36035
2 changed files with 2 additions and 2 deletions

View File

@@ -60,7 +60,7 @@ class mysqlUtilities:
if mysqlData['mysqlhost'].find('rds.amazon') == -1: if mysqlData['mysqlhost'].find('rds.amazon') == -1:
dropDB = "GRANT ALL PRIVILEGES ON " + dbname + ".* TO '" + dbuser + "'@'%s'" % (publicip) dropDB = "GRANT ALL PRIVILEGES ON " + dbname + ".* TO '" + dbuser + "'@'%s'" % (publicip)
else: else:
dropDB = "GRANT ALTER, CREATE, SELECT, INSERT, DELETE ON " + dbname + ".* TO '" + dbuser + "'@'%s'" % (publicip) dropDB = "GRANT INDEX, REFERENCES, PROCESS, RELOAD, DROP, UPDATE, ALTER, CREATE, SELECT, INSERT, DELETE ON " + dbname + ".* TO '" + dbuser + "'@'%s'" % (publicip)
else: else:
dropDB = "GRANT ALL PRIVILEGES ON " + dbname + ".* TO '" + dbuser + "'@'localhost'" dropDB = "GRANT ALL PRIVILEGES ON " + dbname + ".* TO '" + dbuser + "'@'localhost'"

View File

@@ -155,7 +155,7 @@ class mysqlUtilities:
if mysqlUtilities.RDS == 0: if mysqlUtilities.RDS == 0:
cursor.execute("GRANT ALL PRIVILEGES ON " + dbName + ".* TO '" + globalUser + "'@'%s'" % (mysqlUtilities.LOCALHOST)) cursor.execute("GRANT ALL PRIVILEGES ON " + dbName + ".* TO '" + globalUser + "'@'%s'" % (mysqlUtilities.LOCALHOST))
else: else:
cursor.execute("GRANT ALTER, CREATE, SELECT, INSERT, DELETE ON " + dbName + ".* TO '" + globalUser + "'@'%s'" % ( cursor.execute("GRANT INDEX, REFERENCES, PROCESS, RELOAD, DROP, UPDATE, ALTER, CREATE, SELECT, INSERT, DELETE ON " + dbName + ".* TO '" + globalUser + "'@'%s'" % (
mysqlUtilities.LOCALHOST)) mysqlUtilities.LOCALHOST))
connection.close() connection.close()