开发者

Location of database tables - MySQL - Windows XP

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.

I have installe开发者_Python百科d 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:

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.

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?


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.


In windows 8(dont check in other OS)
Enter mysql in command prompt by

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.


Go into your C:\Program Files\MySQL\MySQL Server 5.5\my.ini and find the variable "datadir". This is your Data dir ;)


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.


C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/

Is the default DATA directory in XP.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜