Advertisement
Guest User

Untitled

a guest
Jun 10th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/sh
  2. USERNAME="username"
  3. PASSWORD="password"
  4. HOSTNAME="1.2.3.4"
  5. while true ; do
  6.         echo "show full processlist" | mysql -u$USERNAME -p$PASSWORD -h$HOSTNAME | grep -i -e temp -e tmp
  7.         sleep 0.1
  8.         echo -ne "."
  9. done
  10.  
  11. # Use this to track queries in MySQL which are creating temporary tables.
  12. # This might not catch everything, but it'll catch the worse offenders.
  13. # Much love.
  14. # Cal xoxo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement