mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
bug fix remote access
This commit is contained in:
@@ -840,8 +840,6 @@ password=%s
|
||||
return 0
|
||||
cursor.execute("use mysql")
|
||||
|
||||
|
||||
|
||||
if host != None:
|
||||
LOCALHOST = host
|
||||
else:
|
||||
@@ -916,18 +914,6 @@ password=%s
|
||||
execPath = "/usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/mysqlUtilities.py enableRemoteMYSQL"
|
||||
ProcessUtilities.executioner(execPath)
|
||||
|
||||
connection, cursor = mysqlUtilities.setupConnection()
|
||||
|
||||
if connection == 0:
|
||||
return 0
|
||||
cursor.execute("use mysql")
|
||||
|
||||
cursor.execute("update db set Host='%s' where Db='%s'" % (remoteIP, dbName))
|
||||
cursor.execute("update user set Host='%s' where user='%s'" % (remoteIP, userName))
|
||||
cursor.execute("FLUSH PRIVILEGES")
|
||||
|
||||
connection.close()
|
||||
|
||||
return 1
|
||||
|
||||
except BaseException as msg:
|
||||
|
||||
Reference in New Issue
Block a user