foxhank

Untitled

Feb 24th, 2025
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. USER="root"
  4. PASSWORD="ABCabc123@"
  5. DATABASE="my_data"
  6.  
  7. mysql -u$USER -p$PASSWORD -ANe "SHOW TABLES" $DATABASE | while read table
  8. do
  9. echo "Checking $table..."
  10. mysql -u$USER -p$PASSWORD -e "CHECK TABLE $table;" $DATABASE
  11. done
Advertisement
Add Comment
Please, Sign In to add comment