Skip to content

Instantly share code, notes, and snippets.

@ts-3156
Last active September 13, 2016 01:30
Show Gist options
  • Save ts-3156/0a20e65af503729c0003 to your computer and use it in GitHub Desktop.
Save ts-3156/0a20e65af503729c0003 to your computer and use it in GitHub Desktop.
mysql:bind -s "^xd" "SHOW DATABASES;"
mysql:bind -s "^xt" "SHOW TABLES;"
mysql:bind -s "^gv" "SHOW GLOBAL VARIABLES LIKE '%%';"
mysql:bind -s "^gs" "SHOW GLOBAL STATUS LIKE '%%';"
mysql:bind -s "^xp" "SHOW PROCESSLIST;"
mysql:bind -s "^xs" "SELECT table_name, engine, table_rows as tbl_rows, avg_row_length as rlen, floor((data_length+index_length)/1024/1024) as allMB, floor((data_length)/1024/1024) as dMB, floor((index_length)/1024/1024) as iMB FROM information_schema.tables WHERE table_schema=database() ORDER BY (data_length+index_length) DESC;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment