Update backup.py

This commit is contained in:
midoks
2022-11-07 13:18:14 +08:00
parent 66274be102
commit f117b2098d
+2 -1
View File
@@ -54,7 +54,8 @@ class backupTools:
mysql_root = mw.M('config').dbPos(db_path, db_name).where(
"id=?", (1,)).getField('mysql_root')
mycnf = mw.readFile(db_path + '/etc/my.cnf')
my_conf_path = db_path + '/etc/my.cnf'
mycnf = mw.readFile(my_conf_path)
rep = "\[mysqldump\]\nuser=root"
sea = "[mysqldump]\n"
subStr = sea + "user=root\npassword=" + mysql_root + "\n"