Answer the question
In order to leave comments, you need to log in
Why does mysqldump hang the database?
Good afternoon, gurus and bearded men.
there is a little script:
echo "[--------------------------------[`date +%F--%H-%M`]--------------------------------]"
echo "[----------][`date +%F--%H-%M`] Run the backup script..."
mkdir $DATADIR/$PREFIX 2> /dev/null
echo "[++--------][`date +%F--%H-%M`] Generate a database backup..."
#MySQL dump
mysqldump --user=$USER --host=$HOST --password=$PASSWD --default-character-set=$CHARSET $DBNAME > $DATADIR/$PREFIX/$DBFILENAME-$
if ;then
echo "[++--------][`date +%F--%H-%M`] Aborted. Generate database backup failed."
exit 1
fi
echo "[++++------][`date +%F--%H-%M`] Backup database [$DBNAME] - successfull."
exit 0
При выполнение данного дампа база виснет и к сайту нет доступа, то есть база не падает, она как бы доступна, но сайт выдает ошибку коннекта к БД.
после выполнения дампа база оживает и сайт продолжает работу.
Server version: 10.0.14-MariaDB MariaDB Server
может я не знаю каких-то тонкостей с MariaDB? С MySQL таких проблем не было.....
help me, niggaz
Answer the question
In order to leave comments, you need to log in
I met this problem on MySQL. During the backup of a rather large database (unarchived SQL occupied hundreds of megabytes), normal work with it became impossible. Bypassed using Percona Xtrabackup, during which the load is not noticeable at all.
Judging by the first link in Google, it supports MariaDB.
Thanks to everyone for the answers, I decided to look towards Percona Xtrabackup.
It's just that the possible logical inconsistency of the data when using --single-transaction is just annoying.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question