bug fix remote access

This commit is contained in:
Usman Nasir
2021-04-12 20:34:18 +05:00
parent 6209dcc632
commit 5555b41cb0
3 changed files with 11 additions and 16 deletions

View File

@@ -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: