mysql 版本: 8.0 +
查看数据库列表:show databases;
查看数据库中的所有表:show tables;
查看数据表的建表语句:show create table [table_name];
查看数据表的结构:desc [table_name];
查看数据表使用的引擎:
show create table [your table name];
show table status from [db name] where name='[your table name]';
select table_schema,table_name,engine from information_schema.tables where table_name='[your table name]';
查看数据库的隔离级别: select @@global.transaction_isolation,@@transaction_isolation;
查看正在运行的语句: show processlist;
查看正在运行的事务:select * from information_schema.innodb_trx