From e53dd3da87bbd743061ad8e46dbf0a8a627f1918 Mon Sep 17 00:00:00 2001 From: Divyansh Singh Date: Sat, 17 Jun 2023 22:58:59 +0530 Subject: [PATCH] fix witten reported mysql error --- borgmatic/hooks/mysql.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/borgmatic/hooks/mysql.py b/borgmatic/hooks/mysql.py index 22eef61e..aee13d80 100644 --- a/borgmatic/hooks/mysql.py +++ b/borgmatic/hooks/mysql.py @@ -216,10 +216,10 @@ def restore_database_dump( restore_command = ( ('mysql', '--batch') + (tuple(database['restore_options'].split(' ')) if 'restore_options' in database else ()) - + (('--host', database['hostname']) if hostname else ()) - + (('--port', str(database['port'])) if port else ()) + + (('--host', hostname) if hostname else ()) + + (('--port', str(port)) if port else ()) + (('--protocol', 'tcp') if hostname or port else ()) - + (('--user', database['username']) if username else ()) + + (('--user', username) if username else ()) ) extra_environment = {'MYSQL_PWD': password} if password else None