Skip to content

Commit

Permalink
Merge pull request #483 from tigerxp/alpha
Browse files Browse the repository at this point in the history
Fixed: mysqldump for non-localhost database
  • Loading branch information
sergejey committed Mar 12, 2019
2 parents c99745c + 950b115 commit 0b1b0b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/saverestore/saverestore.class.php
Expand Up @@ -1578,7 +1578,7 @@ function backupdatabase($filename)
else
$pathToMysqlDump = IsWindowsOS() ? SERVER_ROOT . "/server/mysql/bin/mysqldump" : "/usr/bin/mysqldump";

$cmd = $pathToMysqlDump . " --user=" . DB_USER . " --password=" . DB_PASSWORD . " --no-create-db --add-drop-table " . DB_NAME . ">" . $filename;
$cmd = $pathToMysqlDump . " -h " . DB_HOST ." --user=" . DB_USER . " --password=" . DB_PASSWORD . " --no-create-db --add-drop-table " . DB_NAME . ">" . $filename;
exec($cmd);
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/periodical_db_save.php
Expand Up @@ -37,7 +37,7 @@
$mysqlDumpPath = "/usr/bin/mysqldump";
}

$mysqlDumpParam = " --user=" . DB_USER . " --password=" . DB_PASSWORD;
$mysqlDumpParam = " -h " . DB_HOST . " --user=" . DB_USER . " --password=" . DB_PASSWORD;
$mysqlDumpParam .= " --no-create-db --add-drop-table --databases " . DB_NAME;

$backups_in_row=0;
Expand Down

0 comments on commit 0b1b0b8

Please sign in to comment.