1、show create table demo
2、show columns from demo
3、show full tables
4、show table STATUS
5、 show open tables;
This command can check which tables are currently open. The In_use column indicates how many threads are using a table, and Name_locked indicates whether the table name is locked, which generally occurs when the Drop or Rename command operates on this table. So this command can't help answer our common questions: whether there is a deadlock in a certain table, who owns the lock on the table, etc.
6. View the transaction being locked
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS;
View transactions waiting for locks
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;