fix witten reported mysql error

This commit is contained in:
Divyansh Singh 2023-06-17 22:58:59 +05:30
parent 6c87608548
commit e53dd3da87
1 changed files with 3 additions and 3 deletions

View File

@ -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