且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL在Windows上的哪里存储数据库文件,文件的名称是什么?

更新时间:2023-10-22 18:53:10

您可以检查 my.ini 文件来查看数据文件夹的位置。

You can check my.ini file to see where the data folder is located.

通常有一个文件夹{mysqlDirectory} / data

Usually there is a folder {mysqlDirectory}/data

MySQL数据存储:

MySQL data storage:

Commands.frm
Commands.myd
Commands.myi

*。frm文件包含表定义。您的* .myi文件是MyISAM索引文件。您的* .myd文件包含表数据。

The *.frm files contain the table definitions. Your *.myi files are MyISAM index files. Your *.myd files contain the table data.

编辑/更新
由于问题中显示的兴趣,这里有更多信息,也可以在注释中找到。

Edit/Update. Because of the interest shown in the question here is more info which is found also in the comments.

在Windows 8.1中,存储MySQL数据库(通过默认值): C:\ProgramData\MySQL\MySQLServer 5.6\data

In Windows 8.1, the MySQL databases are stored (by default) here: C:\ProgramData\MySQL\MySQL Server 5.6\data

文件夹C:\ProgramData是一个隐藏的文件夹,因此您必须在Windows Explorer地址中键入它才能到达那里。在该数据文件夹中,数据库名为 / {database_name_folder} / {database_tables_and_files}

The folder C:\ProgramData is a hidden folder, so you must type it into Windows Explorer address to get there. In that data folder, the databases are named /{database_name_folder}/{database_tables_and_files}.

例如,

C:\ProgramData\MySQL\MySQL Server 5.6\data\mydatabase\mytable.frm
C:\ProgramData\MySQL\MySQL Server 5.6\data\mydatabase\mytable.ibd 

感谢@ marty-mcgee此内容

Thank @marty-mcgee for this content