mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-09 20:32:38 +01:00
mysql: fix 'mysqladmin ping' use, see changelog for details
This commit is contained in:
parent
a1c625fcc3
commit
94861df686
@ -13,6 +13,11 @@ version 0.9.7 -- UNRELEASED
|
||||
. Options passed to mysqldump are now customizable with the new
|
||||
sqldumpoptions configuration variable. Thanks to Chris Lamb for his
|
||||
preliminary patch (Closes: #502966)
|
||||
. Hide 'mysqladmin ping' output, to prevent confusing the user in
|
||||
case mysqld is running but the authentication fails, which apparently
|
||||
does not prevent mysqldump to work.
|
||||
. Fix the error message displayed when mysqld is not running:
|
||||
mysqladmin ping indeed returns 0 when authentication fails.
|
||||
|
||||
version 0.9.6 -- July 21, 2008
|
||||
backupninja changes
|
||||
|
@ -266,9 +266,9 @@ then
|
||||
if [ $usevserver = yes ]
|
||||
then
|
||||
# Test to make sure mysqld is running, if it is not sqldump will not work
|
||||
$VSERVER $vsname exec su $user -c "$MYSQLADMIN $defaultsfile ping"
|
||||
$VSERVER $vsname exec su $user -c "$MYSQLADMIN $defaultsfile ping 2>&1 >/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
fatal "Either you have an authentication problem, or mysqld doesn't appear to be running!"
|
||||
fatal "mysqld doesn't appear to be running!"
|
||||
fi
|
||||
if [ "$compress" == "yes" ]; then
|
||||
execstr="$VSERVER $vsname exec $DUMP | $GZIP > $vroot$dumpdir/${db}.sql.gz"
|
||||
@ -277,9 +277,9 @@ then
|
||||
fi
|
||||
else
|
||||
# Test to make sure mysqld is running, if it is not sqldump will not work
|
||||
su $user -c "$MYSQLADMIN $defaultsfile ping"
|
||||
su $user -c "$MYSQLADMIN $defaultsfile ping 2>&1 >/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
fatal "Either you have an authentication problem, or mysqld doesn't appear to be running!"
|
||||
fatal "mysqld doesn't appear to be running!"
|
||||
fi
|
||||
if [ "$compress" == "yes" ]; then
|
||||
execstr="$DUMP | $GZIP > $dumpdir/${db}.sql.gz"
|
||||
|
Loading…
Reference in New Issue
Block a user