Convert .FRM to .SQL

1

I have a database of 300MB and I only have the FRM, MYI and MYD files. I need to convert the FRM files first to create the structure of the tables, I have already used the following tools and methods and I did not succeed:

link

Error: ERROR: Failed to correctly read the .frm file. Please try reading the file with the --diagnostic mode.

I tried this way too:

     mysqlfrm --diagnostic "arquivo.frm" > "C:\table.sql"

Message:

  

WARNING: Can not generate character set or collation names without the   --server option. CAUTION: The diagnostic mode is the best-effort parse of the .frm file. As, it may not identify all of the components   of the table correctly. This is especially true for damaged files. It   will not read the default values for the columns and the   resulting statement may not be syntactically correct. Reading .frm   file for client.frm: The .frm file is a TABLE.

And this:

  mysqlfrm –server=root:mypassword@localhost –port=3311 "<source/path>/mytable.frm" > "<destination/path>/recovered_mytable.sql"

Message:

  

ERROR: process "11892" could not be found.

    
asked by anonymous 11.09.2018 / 01:17

1 answer

2

Oops, I got it here!

Just create any database and create any table as well.

Then go to the files that were generated:

C: \ xampp \ mysql \ data \ DATABASE NAME THAT CREATED

Delete all files from this folder, then paste the files you have: FRM, MYD and MYI, restart the Mysql service, and everything done!

ATTENTION:

This method only works if it is the same version (MYSQL), and with the same general parameters. The most appropriate way to transport databases is to generate a DUMP.

    
11.09.2018 / 01:55