9.2.4 Mapping of Identifiers to File Names标识符到文件名的映射

There is a correspondence between database and table identifiers and names in the file system. For the basic structure, MySQL represents each database as a directory in the data directory, and depending upon the storage engine, each table may be represented by one or more files in the appropriate database directory.数据库和表的标识符以及文件系统中的名称之间存在对应关系。对于基本结构,MySQL将每个数据库表示为数据目录中的一个目录,根据存储引擎的不同,每个表可能由适当数据库目录中的某个或多个文件表示。

For the data and index files, the exact representation on disk is storage engine specific. These files may be stored in the database directory, or the information may be stored in a separate file. InnoDB data is stored in the InnoDB data files. 对于数据和索引文件,磁盘上的确切表示方式是特定于存储引擎的。这些文件可以存储在数据库目录中,或者信息可以存储在单独的文件中。InnoDB数据存储在InnoDB数据文件中。If you are using tablespaces with InnoDB, then the specific tablespace files you create are used instead.如果您在InnoDB中使用表空间,那么将使用您创建的特定表空间文件。

Any character is legal in database or table identifiers except ASCII NUL (X'00'). MySQL encodes any characters that are problematic in the corresponding file system objects when it creates database directories or table files:除ASCII NUL(X'00')外,数据库或表标识符中的任何字符都是合法的。MySQL在创建数据库目录或表文件时,对相应文件系统对象中有问题的任何字符进行编码:

On Windows, some names such as nul, prn, and aux are encoded by appending @@@ to the name when the server creates the corresponding file or directory. 在Windows上,当服务器创建相应的文件或目录时,某些名称(如nulprnaux)通过在名称后附加@@@进行编码。This occurs on all platforms for portability of the corresponding database object between platforms.这发生在所有平台上,以便在平台之间可移植相应的数据库对象。