Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- USER="root"
- PASSWORD="ABCabc123@"
- DATABASE="my_data"
- mysql -u$USER -p$PASSWORD -ANe "SHOW TABLES" $DATABASE | while read table
- do
- echo "Checking $table..."
- mysql -u$USER -p$PASSWORD -e "CHECK TABLE $table;" $DATABASE
- done
Advertisement
Add Comment
Please, Sign In to add comment