Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (16 sloc) 1.71 KB
mysql:bind '^U' vi-kill-line-prev
mysql:bind '^W' ed-delete-prev-word
mysql:bind '^R' em-inc-search-prev
mysql:bind -s "^xd" "show databases;"
mysql:bind -s "^xt" "show tables;"
mysql:bind -s "^xu" "select user,host,password from mysql.user order by user,host;"
mysql:bind -s "^xb" "select user,host,db from mysql.db order by user,host;"
mysql:bind -s "^xc" "show create table TN\\\\G"
mysql:bind -s "^xn" "select count(*) from ;"
mysql:bind -s "^xv" "show variables like '%%';"
mysql:bind -s "^xs" "show slave status\\\\G"
mysql:bind -s "^xm" "show master status\\\\G"
mysql:bind -s "^xp" "show full processlist;"
mysql:bind -s "^xa" "show table status like 'TN'\\\\G"
mysql:bind -s "^x^t" "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;"
mysql:bind -s "^xl" "select t_b.trx_mysql_thread_id blocking_id, t_w.trx_mysql_thread_id requesting_id, p_b.HOST blocking_host, p_w.HOST requesting_host, l.lock_table lock_table, l.lock_index lock_index, l.lock_mode lock_mode, p_w.TIME seconds, p_b.INFO blocking_info, p_w.INFO requesting_info from information_schema.INNODB_LOCK_WAITS w, information_schema.INNODB_LOCKS l, information_schema.INNODB_TRX t_b, information_schema.INNODB_TRX t_w, information_schema.PROCESSLIST p_b, information_schema.PROCESSLIST p_w where w.blocking_lock_id = l.lock_id and w.blocking_trx_id = t_b.trx_id and w.requesting_trx_id = t_w.trx_id and t_b.trx_mysql_thread_id = p_b.ID and t_w.trx_mysql_thread_id = p_w.ID order by requesting_id, blocking_id\\\\G"