From 8748765c592520c2f9e60d85d6bec8a656dbf19c Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 8 Sep 2020 23:03:09 +0500 Subject: [PATCH] mysql priv bug --- install/installCyberPanel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index e58b77ecb..f1bc338ec 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -257,9 +257,9 @@ class InstallCyberPanel: def changeMYSQLRootPassword(self): if self.remotemysql == 'OFF': if self.distro == ubuntu: - passwordCMD = "use mysql;update user set password=PASSWORD('" + InstallCyberPanel.mysql_Root_password + "') where User='root';UPDATE user SET plugin='' WHERE User='root';flush privileges;" + passwordCMD = "use mysql;GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '%s';UPDATE user SET plugin='' WHERE User='root';flush privileges;" % (InstallCyberPanel.mysql_Root_password) else: - passwordCMD = "use mysql;update user set password=PASSWORD('" + InstallCyberPanel.mysql_Root_password + "') where User='root';flush privileges;" + passwordCMD = "use mysql;GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '%s';flush privileges;" % (InstallCyberPanel.mysql_Root_password) command = 'mysql -u root -e "' + passwordCMD + '"'