mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-22 13:44:08 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
065887f789 |
@@ -1,3 +1,9 @@
|
|||||||
|
## 2.10.3 2022-01-07 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Change the way MariaD/MySQL connectivity check is performed to allow for better compatibility without requiring the DB_USER to have PROCESS privileges
|
||||||
|
|
||||||
|
|
||||||
## 2.10.2 2021-12-28 <dave at tiredofit dot ca>
|
## 2.10.2 2021-12-28 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -296,17 +296,10 @@ check_availability() {
|
|||||||
"mysql" )
|
"mysql" )
|
||||||
COUNTER=0
|
COUNTER=0
|
||||||
export MYSQL_PWD=${dbpass}
|
export MYSQL_PWD=${dbpass}
|
||||||
while true; do
|
while ! (mysql -u"${dbuser}" -P"${dbport}" -h"${dbhost}" -e "SHOW GRANTS FOR CURRENT_USER;" 2>&1 | grep -E "GRANT ALL PRIVILEGES ON \`${DB_NAME}\`" > /dev/null 2>&1) ; do
|
||||||
mysqlcmd='mysql -u'${dbuser}' -P '${dbport}' -h '${dbhost}
|
|
||||||
out="$($mysqlcmd -e "SELECT COUNT(*) FROM information_schema.FILES;" 2>&1)"
|
|
||||||
echo "$out" | grep -E "COUNT|Enter" 2>&1 > /dev/null
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
:
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
print_warn "MySQL/MariaDB Server '${dbhost}' is not accessible, retrying.. ($COUNTER seconds so far)"
|
|
||||||
sleep 5
|
sleep 5
|
||||||
(( COUNTER+=5 ))
|
(( COUNTER+=5 ))
|
||||||
|
print_warn "MySQL/MariaDB Server '${maria_host}' is not accessible, retrying.. ($counter seconds so far)"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
"mssql" )
|
"mssql" )
|
||||||
|
|||||||
Reference in New Issue
Block a user