From c1e3f8a218267459b38b99cb8260c994b02b3f3e Mon Sep 17 00:00:00 2001 From: clinton_admin Date: Sat, 25 Apr 2015 18:28:35 -0400 Subject: [PATCH] mysql-grant-drop: exclude `performance_schema' database, consilidate conditionals --- mysql-grant-table-drop | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mysql-grant-table-drop b/mysql-grant-table-drop index 3cf59db..316f3e9 100755 --- a/mysql-grant-table-drop +++ b/mysql-grant-table-drop @@ -16,8 +16,7 @@ MYSQL_DBS=`sudo -H mysqlshow | tail -n +4 | head -n -1 | cut -d' ' -f 2 | xargs` #echo "Mysql Databases are: $MYSQL_DBS" for DB in $MYSQL_DBS; do - if test "$DB" != "information_schema"; then - if test "$DB" != "mysql"; then + if (test "$DB" != "information_schema") && (test "$DB" != "mysql") && (test "$DB" != "performance_schema"); then USER=${DB%%_*} MYSQLDB_TABLES=`sudo -H mysqlshow $DB | tail -n +5 | head -n -1 | cut -d' ' -f 2 | xargs` @@ -29,6 +28,5 @@ for DB in $MYSQL_DBS; do done - fi # information_schema - fi # mysql + fi done -- 2.20.1