I have uninstall wamp server and now I need my database to restore. How can I do this process?
-
5phpmyadmin 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 Answers
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

- 1,296
- 2
- 16
- 20
-
2
-
2@Andrew agreed, this helped me as well since it was much more general. – ramoneguru Jun 07 '14 at 18:57
-
2Being on a shared host with no visibility into the file system, this is what I needed. – Julian K Nov 13 '14 at 16:25
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.

- 81,782
- 146
- 424
- 602

- 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
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.

- 81,782
- 146
- 424
- 602
-
4on linux, this file is usually at: /etc/mysql/my.cnf and the database files are at /var/lib/mysql – Brad Parks Apr 18 '13 at 02:21
For WampServer, click on its tray icon and then in the popup cascading menu select
MySQL | MySQL settings | datadir

- 13,096
- 12
- 42
- 54