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”.
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 thePROCESSprivilege to query this table.使用
INFORMATION_SCHEMACOLUMNS表或SHOW COLUMNS语句查看关于此表列的更多信息,包括数据类型和默认值。Use theINFORMATION_SCHEMACOLUMNStable or theSHOW COLUMNSstatement to view additional information about the columns of this table, including data types and default values.