2.show
show databases; 查看所有的库
show tables; 查看当前库的所有的表
show tables from database; 查看指定的库下的所有表
show processlist; 查看当前的并发会话信息
show full processlist; 查看当前的 详细 并发会话信息
show privileges; 查看当前数据库支持的权限
show variables; 查看数据库参数信息
show variables like '%trx%' 查看数据库参数信息,模糊查询
show charset; 查看字符集
show collation; 查看校对规则
show create database world; 查看建库语句
show create table world.city; 查看建表语句
show grants for root@'localhost' 查看用户权限
show engines; 查看支持的存储引擎
show index from world.city; 查看表中索引信息
show status; 查看当前数据库状态信息
show status like '%lock%'; 查看数据库所信息
show engin innodb status\G 查看innoDB引擎相关的状态信息(内存,事务,线程,锁)
-- 查看二进制日志相关信息
show binary logs;
show master status;
show binlog events in 'xxxx';
-- 查看主从复制相关信息
show relaylog events in 'xxx';
show slave status\G
-- show 帮助
help show;
浙公网安备 33010602011771号