数据库若干查询语句记录
##连接某个数据库 mysql -h dbip -u username -p password ##进入某个数据库 use henry; ##显示 若干表 show tables; ##查询锁的状态 show status like 'innodb_row_lock%'; ###查看 sql执行情况 use fupan; desc select * from blockData where date >0 and stockType=880024 order by date DESC limit 240 ; ##查看数据库状态 show status; ##查看锁的最新状态 show engine innodb status\G; ##查看全部线程 show processlist; show full processlist; select * from information_schema.processlist; ###按客户端ip分组,看看哪个客户端链接最多 select id, client_ip, count(client_ip) as client_num from (select substring_index(host,':', 1) as client_ip,id from information_schema.processlist) as connect_info group by client_ip order by client_num desc; ##查看最大连接数 show VARIABLES like '%max_connections%';
标签:show,##,ip,数据库,问题,排查,client,processlist From: https://www.cnblogs.com/music-liang/p/16738360.html