mysql priv bug
This commit is contained in:
parent
d1cfee5cb8
commit
8748765c59
|
|
@ -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 + '"'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue