Fix MariaDB backup script
When multiple users are granted access to a database, the MariaDB backup script failed to retrieve the grants for that database, which caused the backup job to fail. This patchset updates the script. Change-Id: I9076b2e7363ae0ec216d4e822f385fa949df8f54
This commit is contained in:
parent
4665fdad03
commit
d86502a7b7
@ -15,7 +15,7 @@ apiVersion: v1
|
||||
appVersion: v10.2.31
|
||||
description: OpenStack-Helm MariaDB
|
||||
name: mariadb
|
||||
version: 0.1.2
|
||||
version: 0.1.3
|
||||
home: https://mariadb.com/kb/en/
|
||||
icon: http://badges.mariadb.org/mariadb-badge-180x60.png
|
||||
sources:
|
||||
|
@ -84,7 +84,7 @@ dump_databases_to_directory() {
|
||||
do
|
||||
echo $($MYSQL --skip-column-names -e "select concat('show grants for ',user,';') \
|
||||
from mysql.db where ucase(db)=ucase('$db');") | \
|
||||
sed -r "s/show grants for ([a-zA-Z0-9_-]*)/show grants for '\1'/" | \
|
||||
sed -r "s/show grants for ([a-zA-Z0-9_-]*)/show grants for '\1'/g" | \
|
||||
$MYSQL --silent --skip-column-names 2>>$LOG_FILE > $TMP_DIR/${db}_grant.sql
|
||||
if [ "$?" -eq 0 ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user