where does MySQL store database files?

2020-01-27 11:06发布

I have uninstall wamp server and now I need my database to restore. How can I do this process?

5条回答
甜甜的少女心
2楼-- · 2020-01-27 11:24

another way from MySQL Workbench:

enter image description here

查看更多
smile是对你的礼貌
3楼-- · 2020-01-27 11:25

For WampServer, click on its tray icon and then in the popup cascading menu select

MySQL | MySQL settings | datadir

MySQL Data Directory

查看更多
Viruses.
4楼-- · 2020-01-27 11:28

In any case you can know it:

mysql> select @@datadir;
+----------------------------------------------------------------+
| @@datadir                                                      |
+----------------------------------------------------------------+
| D:\Documents and Settings\b394382\My Documents\MySQL_5_1\data\ |
+----------------------------------------------------------------+
1 row in set (0.00 sec)

Thanks Barry Galbraith from the MySql Forum http://forums.mysql.com/read.php?10,379153,379167#msg-379167

查看更多
做自己的国王
5楼-- · 2020-01-27 11:30

Check your my.cnf file in your MySQL program directory, look for

[mysqld]
datadir=

The datadir is the location where your MySQL database is stored.

查看更多
We Are One
6楼-- · 2020-01-27 11:40

WAMP stores the db data under WAMP\bin\mysql\mysql(version)\data. Where the WAMP folder itself is depends on where you installed it to (on xp, I believe it is directly in the main drive, for example c:\WAMP\...

If you deleted that folder, or if the uninstall deleted that folder, if you did not do a DB backup before the uninstall, you may be out of luck.

If you did do a backup though phpmyadmin, then login, and click the import tab, and browse to the backup file.

查看更多
登录 后发表回答