Skip to content
Permalink
Browse files

Merge pull request #483 from tigerxp/alpha

Fixed: mysqldump for non-localhost database
  • Loading branch information...
sergejey committed Mar 12, 2019
2 parents c99745c + 950b115 commit 0b1b0b897d6489ca8646d75049821165dba21f8a
Showing with 2 additions and 2 deletions.
  1. +1 −1 modules/saverestore/saverestore.class.php
  2. +1 −1 scripts/periodical_db_save.php
@@ -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);
}
@@ -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;

0 comments on commit 0b1b0b8

Please sign in to comment.
You can’t perform that action at this time.