Some time ago, I've built an webapp on top of WAMP server. At that time, I didn't do any export/dump of my MySQL DB but I've did a copy of the WAMP folder. Does anyone have any ideas about how I can restore my DB from the 'mysql' folder of WAMP?

I have the *.frm files and lots of mysql-bin.* files

Do you have any advice for me?

  • if it is not possible to restore the data inserts, I'll be happy to recover at least the table structures.
    – dole doug
    Apr 1, 2011 at 20:15

2 Answers 2


Assuming default data directory setup (no partitioning etc), you follow these steps:

1) Stop the mysql server
2) Make a backup of the current mysql/data directory
3) Copy all the files and folders from the mysql/data backup directory into the active data directory
4) Restart mysql

This should let you restore the database to the point-in-time of your backup copy. The mysql-bin files aren't necessary for a recovery, but ibdata* files are (assuming innodb tables). If myisam, you should have .MYI and MYD files for each tablespace as well as the .frm files.

Hope this helps

  • ty for your replay. Unfortunately it restore just one table. It is true that I have some views there too. If I try to see the content of the view files, i can read the those queries, but i can't 'read' the queries of the tables.
    – dole doug
    Apr 1, 2011 at 20:13
  • did you ensure all the permissions are correct for all the directories/files. Reading the binary log isn't going to help you if you have a file-snapshot of the directory. Apr 1, 2011 at 21:11

you can use mysql server without starting WAMP or XAMPP. you have mysql folder in WAMP right. so you can use Mysql database server without any issues.

just open command shell. Go to mysql/bin folder. start mysql server and use it

D:\WAMP\mysql\bin> mysqld --console

To take backup of your db open another command shell.

D:\WAMP\mysql\bin> mysqldump -uroot -pxxxxx databasename >D:\mysqldumps\bkpfilename.sql

then your database exported into bkpfilename.sql in D:\mysqldumps

if you want to create database in another mysql server using dump file

Start the server and open mysql client

opening a client

1) mysql\bin> mysql -uroot -pxxxx

2) mysql>create database databasename;

3) mysql>exit;

4) mysql\bin> mysql -uroot -pxxxx databasename


if file name or folder name contains spaces

** mysql\bin> mysql -uroot -pxxxx databasename<"D:\mysqldumps\bkpfilename.sql"**

  • 2
    You didn't answer the question asked: "I have the .frm files and lots of mysql-bin. files" Derek Downey explicitly states he doesn't have a .sql file or access to the original system in order to make one. Aug 25, 2014 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.