diff --git a/install/mysqlUtilities.py b/install/mysqlUtilities.py index 158c8ca37..d20fb7765 100755 --- a/install/mysqlUtilities.py +++ b/install/mysqlUtilities.py @@ -55,20 +55,26 @@ class mysqlUtilities: if res == 1: return 0 else: - ### DO Check - if mysqlData['mysqlhost'].find('ondigitalocean') > -1: - - alterUserPassword = "ALTER USER 'cyberpanel'@'%s' IDENTIFIED WITH mysql_native_password BY '%s'" % (publicip, dbpassword) - command = initCommand + alterUserPassword + '"' - - if install.preFlightsChecks.debug: - print(command) - time.sleep(10) - - cmd = shlex.split(command) - subprocess.call(cmd) if remote: + + ### DO Check + + if mysqlData['mysqlhost'].find('ondigitalocean') > -1: + + alterUserPassword = "ALTER USER 'cyberpanel'@'%s' IDENTIFIED WITH mysql_native_password BY '%s'" % ( + publicip, dbpassword) + command = initCommand + alterUserPassword + '"' + + if install.preFlightsChecks.debug: + print(command) + time.sleep(10) + + cmd = shlex.split(command) + subprocess.call(cmd) + + ## RDS Check + if mysqlData['mysqlhost'].find('rds.amazon') == -1: dropDB = "GRANT ALL PRIVILEGES ON " + dbname + ".* TO '" + dbuser + "'@'%s'" % (publicip) else: diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index f4d4e7748..d8d1dcd6d 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -22,6 +22,8 @@ import hashlib class ApplicationInstaller(multi.Thread): LOCALHOST = 'localhost' + REMOTE = 0 + PORT = '3306' def __init__(self, installApp, extraArgs): multi.Thread.__init__(self) @@ -421,9 +423,10 @@ $parameters = array( try: import json jsonData = json.loads(open(passFile, 'r').read()) - mysqlhost = jsonData['mysqlhost'] ApplicationInstaller.LOCALHOST = mysqlhost + ApplicationInstaller.REMOTE = 1 + ApplicationInstaller.PORT = jsonData['mysqlport'] except: pass