文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 92%

28.4.10 INFORMATION_SCHEMA INNODB_DATAFILES 表28.4.10 The INFORMATION_SCHEMA INNODB_DATAFILES Table

INNODB_DATAFILES 表提供了 InnoDB 每表文件和通用表空间的数据文件路径信息。The INNODB_DATAFILES table provides data file path information for InnoDB file-per-table and general tablespaces.

有关相关的使用信息和示例,请参见 第 17.15.3 节,“InnoDB INFORMATION_SCHEMA 模式对象表”。For related usage information and examples, see Section 17.15.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”.

Note

INFORMATION_SCHEMA FILES 表报告了 InnoDB 表空间类型的元数据,包括每表文件表空间、通用表空间、系统表空间、全局临时表空间和回滚表空间。The INFORMATION_SCHEMA FILES table reports metadata for InnoDB tablespace types including file-per-table tablespaces, general tablespaces, the system tablespace, the global temporary tablespace, and undo tablespaces.

INNODB_DATAFILES 表具有以下列:The INNODB_DATAFILES table has these columns:

  • SPACE

    表空间 ID。The tablespace ID.

  • PATHPATH

    表空间数据文件路径。如果在 MySQL 数据目录之外的某个位置创建了按表存储文件(file-per-table)表空间,则路径值为完整的目录路径。否则,路径相对于数据目录。The tablespace data file path. If a file-per-table tablespace is created in a location outside the MySQL data directory, the path value is a fully qualified directory path. Otherwise, the path is relative to the data directory.

示例Example

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_DATAFILES WHERE SPACE = 57\G
*************************** 1. row ***************************
SPACE: 57
 PATH: ./test/t1.ibd

注意事项Notes

  • 你必须拥有 PROCESS 权限才能查询此表。You must have the PROCESS privilege to query this table.

  • 使用 INFORMATION_SCHEMA COLUMNS 表或 SHOW COLUMNS 语句查看关于此表列的更多信息,包括数据类型和默认值。Use the INFORMATION_SCHEMA COLUMNS table or the SHOW COLUMNS statement to view additional information about the columns of this table, including data types and default values.