数据库表的位置 - MySQL - Windows XP
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4843381/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Location of database tables - MySQL - Windows XP
提问by name_masked
All,
全部,
This is the first time I am using MySQL and hence listing all the steps. This is actually a reinstall of MySQL since my 1st attempt had failed.
这是我第一次使用 MySQL,因此列出了所有步骤。这实际上是重新安装 MySQL,因为我的第一次尝试失败了。
I have installed the latest version of MySQL Community Server on my machine. The installation folder is C:\Program Files\MySQL\MySQL Server 5.5
. The data
folder resides in this folder path itself. I have created few tables in the MySQL command prompt by:
我已经在我的机器上安装了最新版本的 MySQL Community Server。安装文件夹是C:\Program Files\MySQL\MySQL Server 5.5
. 该data
文件夹驻留在此文件夹路径本身中。我通过以下方式在 MySQL 命令提示符中创建了几个表:
1 > Going into MS DOS Prompt.
2 > Making C:\Program Files\MySQL\MySQL Server 5.5
as my current directory
3 > Entered command: mysql -u root -p
4 > Entered password
5 > Placed my script file(.sql) which creates new tables in the folder C:\Program Files\MySQL\MySQL Server 5.5\bin
6 > In the command prompt, typed source <scriptfile>.sql
7 > Now, I get warnings for few tables. But when I enter command SHOW TABLES
, all the tables in the script file are shown.
1 > 进入 MS DOS 提示符。
2 > C:\Program Files\MySQL\MySQL Server 5.5
作为我的当前目录
3 > 输入命令:mysql -u root -p
4 > 输入密码
5 > 放置我的脚本文件(.sql),它在文件夹中创建新表C:\Program Files\MySQL\MySQL Server 5.5\bin
6 > 在命令提示符下,键入source <scriptfile>.sql
7 > 现在,我收到了几个警告表。但是当我输入 command 时SHOW TABLES
,脚本文件中的所有表都会显示出来。
However, I am not able to locate the tables created in form of directories/files on the drive. The data folder does not contain my tables as well.Can anyone please tell me where are the tables located?
但是,我无法在驱动器上找到以目录/文件形式创建的表。数据文件夹也不包含我的表。谁能告诉我桌子在哪里?
采纳答案by programmer
the table files are located in the \data folder. if you have not overriden this path when you were installing or if you have not modified the path in the my.ini config file after the installation. there are gui tools available for mysql that can help you do things easily.
表文件位于 \data 文件夹中。如果您在安装时没有覆盖此路径,或者您在安装后没有修改 my.ini 配置文件中的路径。有适用于 mysql 的 gui 工具可以帮助您轻松完成任务。
回答by Simon Legault
On Windows 7, the data directory is, by default, "C:/ProgramData/MySQL/MySQL Server 5.5/Data/". Note that "C:/ProgramData" is a hidden directory.
在 Windows 7 上,数据目录默认为“C:/ProgramData/MySQL/MySQL Server 5.5/Data/”。请注意,“C:/ProgramData”是一个隐藏目录。
回答by NCA
In windows 8(dont check in other OS)
Enter mysql in command prompt by
在 Windows 8 中(不要检查其他操作系统)
在命令提示符中输入 mysql
mysql -uusername -ppassword
Then type
然后输入
select @@datadir;
mysql> select @@datadir;
+---------------------------------------------+
| @@datadir |
+---------------------------------------------+
| C:\ProgramData\MySQL\MySQL Server 5.6\data\ |
+---------------------------------------------+
1 row in set (0.00 sec)
Another way!!!
Go to C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
and there you can find datadir.
Be sure it is in ProgramData, not in ProgramFiles.
其它的办法!!!去C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
那里你可以找到datadir。确保它在 ProgramData 中,而不是在 ProgramFiles 中。
回答by Alfredo Cavalcanti
Go into your C:\Program Files\MySQL\MySQL Server 5.5\my.ini and find the variable "datadir". This is your Data dir ;)
进入您的 C:\Program Files\MySQL\MySQL Server 5.5\my.ini 并找到变量“datadir”。这是您的数据目录;)
回答by Chris Taverner
C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/
C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/
Is the default DATA directory in XP.
是 XP 中的默认 DATA 目录。