#!/usr/bin/env bash USER=”” PASSWORD=”” OUTPUTDIR=”” DAYS_TO_KEEP=60 databases=`mysql -u$USER -p$PASSWORD -e “SHOW DATABASES;” | tr -d “| ” | grep -v Database` cd $OUTPUTDIR for db in $databases; do if [[ “$db” != “information_schema” ]] && [[ “$db” != “performance_schema” ]] && [[ “$db” != “mysql” ]] && [[ “$db” != _* ]] ; then echo […]
Recent Comments