daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Apr 17th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SQL_STRING=""
  2. DB_HOST=
  3. for database in $(mysql -u root -h $DB_HOST -p -A -N -B -e "SHOW DATABASES")
  4. do
  5.     echo -e "DATABASE: $database"
  6.     for table in $(mysql -u root -h $DB_HOST -p -A -N -B -e "SHOW TABLES" $database)
  7.     do
  8.         SHOW="SHOW TABLE STATUS IN $database LIKE '$table';"; SQL_STRING=$SQL_STRING$SHOW
  9.         echo -e $SQL_STRING
  10.     done
  11. done
  12. mysql -u root -h $DB_HOST -p -A -N -B -e "$SQL_STRING"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top