Recover MySql table

5

I reinstalled WAMP and did not export the database (.sql), but I have the ".ibd" and ".frm" files.

After installation, I created a blank database and copied all the ".ibd" and ".frm" files to the folder, but when trying to open the table via phpmyadmin, an error is returned and informs that the table does not exist.

I tested the smallest table, deleted the files, created the table, and ran the query below:

ALTER TABLE bd.tabela DISCARD TABLESPACE;

Then I copied the ".ibd" and ".frm" backup files to the folder and executed the query below:

ALTER TABLE bd.tabela IMPORT TABLESPACE;

But there are 2 problems:

  • The database has several tables and fields, I can not recreate everything, even because I do not remember all the information.
  • In the test I did, the information was restored but it was not inserted in the respective column, that is, it changed the information of several columns.
  • How do I restore my tables and their data?

        
    asked by anonymous 24.06.2014 / 14:04

    3 answers

    1

    I do not know if you can help, but here is the translation of a document that explains how to do:

    Before you begin, you should stop WAMP. On your old server (on your external SD / USB key) or stored your site, browse to the MySQL data folder. The path should look like this "D: \ wamp \ bin \ mysql \ mysql5.1.53 \ data \" or "mysql5.1.53" indicates the version of MySQL installed earlier data. Within the data folder, there must be multiple files and folders. The files contain existing site databases and contain a bunch of files with the .frm extension that we need. You should recognize the names of files or databases that you are familiar with. Copy the folder that contains the data from your site and all its contents to the folder data directly to your new WAMP installation. It is not necessary to copy the installed databases by default WAMP data, ie "mysql", "performance_schema" and "test". Now restart the WAMP server, and go to phpMyAdmin. You will notice that the names of the databases are present, but the tables are empty ... Do not despair, this is normal, let's restore your content. Go back to the data folder of your old server: "D: \ wamp \ bin \ mysql \ mysql5.1.53 \ data \". A file called "ibdata1" should be there. Copy the. On your new server in the data folder, there is also an "ibdata1" file. Rename it to "ibdata.bak" then paste the "ibdata1" which was previously copied from the old server. Finally, restart the WAMP services. Then go PHPmyAdmin and check if your databases have been restored successfully!

        
    07.10.2014 / 16:45
    1

    In Relational Databases a resource is used for data security that is the log with it MySQL in case it saves all the queries except SELECT in the log file then you will have there all the SQLs to recover your bank .

    To find out where the log file is in your "my.cfn" configuration file or browse the internet for the default folder.

    Here is some information: link

    Other than that, sorry but it's relatively impossible.

        
    16.11.2014 / 13:25
    -1

    Do the following install MySql Front, for ease of manipulation and configure the entries to access. Generally it's like this:

    Thenafterconnecting,justexportyourDatabaseto.sqlextension

    Seebelow:

        
    06.03.2015 / 21:16