Skip to content

Commit aba160f

Browse files
committed
fix: Suggest to remove /etc/mysql and .my.cnf file to avoid conflict
1 parent 1ae72fc commit aba160f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

data_recovery/recover.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ def stop_mariadb(proc, db_pass):
6363

6464

6565
def recover_db(datadir, db_pass, bucket, prefix):
66+
if os.path.exists("/etc/mysql") or os.path.exists("/root/.my.cnf"):
67+
print("Error: Conflicting MySQL configuration found.")
68+
print("Please move or rename '/etc/mysql' and '/root/.my.cnf' before running recovery.")
69+
sys.exit(1)
70+
6671
mapping = load_mapping()
6772
proc = start_mariadb(datadir)
6873

0 commit comments

Comments
 (0)