Improved code
This commit is contained in:
@@ -199,13 +199,10 @@ class MySQL(Database):
|
|||||||
"mariadb-server", "root_password_again", "password",
|
"mariadb-server", "root_password_again", "password",
|
||||||
self.dbpassword)
|
self.dbpassword)
|
||||||
return
|
return
|
||||||
if version.startswith("11"):
|
if (
|
||||||
queries = [
|
(name.startswith("debian") and version.startswith("11")) or
|
||||||
"SET PASSWORD FOR 'root'@'localhost' = PASSWORD('{}')"
|
(name.startswith("ubuntu") and version.startswith("22"))
|
||||||
.format(self.dbpassword),
|
):
|
||||||
"flush privileges"
|
|
||||||
]
|
|
||||||
if name.startswith("ubuntu") and version.startswith("22"):
|
|
||||||
queries = [
|
queries = [
|
||||||
"SET PASSWORD FOR 'root'@'localhost' = PASSWORD('{}')"
|
"SET PASSWORD FOR 'root'@'localhost' = PASSWORD('{}')"
|
||||||
.format(self.dbpassword),
|
.format(self.dbpassword),
|
||||||
|
|||||||
Reference in New Issue
Block a user