mysql-grant-table-drop: quote database and table names
[hcoop/scripts.git] / mysql-grant-table-drop
index 316f3e9..a70911d 100755 (executable)
@@ -24,7 +24,7 @@ for DB in $MYSQL_DBS; do
        for TBL in $MYSQLDB_TABLES; do
 
                #echo "OWNER FOR $DB.$TBL is $USER"
-               `sudo -H mysql -e "GRANT ALL PRIVILEGES ON $DB.$TBL TO $USER@'%.hcoop.net'"`;
+               sudo -H mysql -e "GRANT ALL PRIVILEGES ON \`$DB\`.\`$TBL\` TO $USER@'%.hcoop.net'";
 
        done