54

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

Alex W
  • 37,233
  • 13
  • 109
  • 109
Ihsanullah khan
  • 771
  • 1
  • 6
  • 10
  • 5
    phpmyadmin is just a program for accessing databases, I think your question is "Where are MySQL databases stored?" – Brendan Long Jan 19 '10 at 05:40
  • @BrendanLong I understand the question was originally about phpmyadmin. So, where does phpmyadmin read the database from? Is this directory setupable? I want mysql to be on separate container, is it possible? (Please let me know if this would be subject to another SO question; I can not find right answers.) – fde-capu Dec 09 '20 at 10:36

5 Answers5

105

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

Jorge Nunez Newton
  • 1,296
  • 2
  • 16
  • 20
27

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.

Graviton
  • 81,782
  • 146
  • 424
  • 602
Cryophallion
  • 704
  • 5
  • 10
  • Thanks! I found this answer while running a search on my hard drive looking for the same thing. I have a xampp installation with MySQL Server 5.5 on Windows 7. For others with a similar setup: I found my data file at C:\ProgramData\MySQL\MySQL Server 5.5\data. On my system I had to manually type in "C:\ProgramData". – Sean May 23 '12 at 17:53
  • 1
    @Cryophallion hey this is is of no use I think. Since, when I copied the database from the location which you have intimidated and pasted it on another computer which has same mysql location. The positive side is that it shows the database and the tables in query browser but when I open the table it shows “got error 1 from storage engine error no 1030″ – Sathish Kumar k k Jul 19 '12 at 07:17
18

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.

Graviton
  • 81,782
  • 146
  • 424
  • 602
4

another way from MySQL Workbench:

enter image description here

GorvGoyl
  • 42,508
  • 29
  • 229
  • 225
0

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

MySQL | MySQL settings | datadir

MySQL Data Directory

MarianD
  • 13,096
  • 12
  • 42
  • 54