Is it possible from within a bash script to check if a mysql database exists. Depending on the result then perform another action or terminate the script?
if [ $(mysqlshow DB 1>/dev/null 2>/dev/null) -eq 0 ]; then echo "DB found" fi