mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
replace localhost with remote mysql in case of rds
This commit is contained in:
@@ -929,8 +929,13 @@ skip-name-resolve
|
||||
cursor.execute(
|
||||
"CREATE USER '" + user + "'@'%s' IDENTIFIED BY '" % (mysqlUtilities.LOCALHOST) + password + "'")
|
||||
|
||||
cursor.execute(
|
||||
"GRANT ALL PRIVILEGES ON " + database + ".* TO '" + user + "'@'%s'" % (mysqlUtilities.LOCALHOST))
|
||||
if mysqlUtilities.RDS == 0:
|
||||
cursor.execute(
|
||||
"GRANT ALL PRIVILEGES ON " + database + ".* TO '" + user + "'@'%s'" % (mysqlUtilities.LOCALHOST))
|
||||
else:
|
||||
cursor.execute(
|
||||
"GRANT INDEX, DROP, UPDATE, ALTER, CREATE, SELECT, INSERT, DELETE ON " + database + ".* TO '" + user + "'@'%s'" % (mysqlUtilities.LOCALHOST))
|
||||
|
||||
connection.close()
|
||||
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user