0.查看所有数据库
show databases;
1.查看当前库里所有表
show tables;
2.查看某个库所有表
show tables from db;
3.查看表中所有列
show columns from db.table;
扫描二维码关注公众号,回复:
1381402 查看本文章
show columns from table from db;
4.查看一个用户的授权
show grants for root;
5.查看表的索引
show index from db;
6.查看服务器配置
show variables;
7.查看建表语句
show create table tn;