Mysql
- 查看所有表表名和备注
1 | SELECT TABLE_NAME, |
- 查询某张表的字段和备注
1 | select column_name, |
- 查看所有字段名称和备注
1 | SELECT a.table_name, |
- 处理死锁问题
1
2
3
4
5
6
7
8SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
SHOW OPEN TABLES WHERE In_use > 0; //查询死锁
SELECT * FROM information_schema.INNODB_TRX; //查询死锁id
kill 33614 //杀死
show processlist;
SHOW ENGINE INNODB STATUS; //查询最近一次的死锁日志