mysql数据库information_schema库中的表说明

过去我们常用命令
show databases
show tables
show processlist
其实这些都是来自于information_schema。当我开始了解information_schema的时候,我发现,原来这么多有趣的数据都被它保存了下来,熟悉此库对于理解mysql非常有帮助。

information_schema中的表保存了各种数据库信息。我觉得这个库里面的表很有用。

查看引擎
information_schema.ENGINS 对应于 show engines;

查看数据库
information_schema.SCHEMATA 对应于 show databases;

查看表
information_schema.TABLES 对应于 show tables;

查看列
information_schema.COLUMNS对应于show columns from table_name

查看索引
information_schema.STATISTICS 对应于show index from table_name
查看线程
information_schema.PROCESSLIST 随营业 show processlist

information_schema里面还有其他的表例如VIEWS, TRIGGERS,等等

关于mysql的几个问题 infomation_schema .tables里面的table_row和实际行数的关系

begin vs start transaction 没有区别,你可以理解为别名,作用都是开始一个事务。

猜你喜欢

转载自blog.csdn.net/lineuman/article/details/114844247
今日推荐