ITPub博客

首页 > 数据库 > MySQL > mysql之information_schema库的存在形式

mysql之information_schema库的存在形式

原创 MySQL 作者:kaixinguo8115 时间:2015-01-07 10:00:54 0 删除 编辑
问题:
        在mysql中,数据库是以目录形式存在于datadir下。新的数据库初始化完成后,会出现mysql、performance_schema、test这几个目录,也就是系统初始化的库。我们知道,在mysql中还有一个库:information_schema,为什么这个库没有在datadir下以目录的形式存在呢?

解答:
         看下官网文档,对information_schema的解释:
         INFORMATION_SCHEMA provides access to database metadata, information about the MySQL server such as the name of a database or table, the data type of a column, or access privileges. Other terms that are sometimesused for this information are data dictionary and system catalog.
          INFORMATION_SCHEMA is a database within each MySQL instance, the place that stores information about all the other databases that the MySQL server maintains. The INFORMATION_SCHEMA database contains several read-only tables. They are actually views, not base tables, so there are no files associated with them, and you cannot set triggers on them. Also, there is no database directory with that name.
           通过官网文档对information_schema库的解释,可以发现:
           1.information_schema的作用是记录数据库的一些元数据信息(metadata)。这些信息包括数据库名、列的类型、访问权限等等。
           2.information_schema包含的是一些只读表。
           3.information_schema下面的表,实际上是视图,不是真正的表。
           所以,我们可以知道,information_schema,没有与之对应的目录。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26418713/viewspace-1392913/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-01-30

  • 博文量
    13
  • 访问量
    86094