Search code examples
mysqlmamp

How to restore previous backup mysql db in mamp to upgraded version


I am using MAMP and tried to upgrade it to new version,

I took backup of the db and all files from htdocs folder (Copy pasted them as backup before uninstalling)

enter image description here

enter image description here

I installed new upgraded version of mamp 4 On copying the mysql folder back, the mysql server was not starting.

After googling, I uninstalled it again and changed the previous version of mamp 3.5, On restoring the db, the mamp runs however no backup data table is showing the schema and data.


Solution

  • You can try mysqlfrm to recover your backup.

    The mysqlfrm utility is designed as a recovery tool that reads .frm files and produces equivalent CREATE statements from the table definition data found in the file. In most cases, the generated CREATE statement is usable for recreating the table on another server, or for extended diagnostics.

    mysqlfrm --diagnostic mysql/db_name/ > db_name.sql
    

    Then is just a matter of importing the .sql file

    If you are using windows, the mysqlfrm Utilities is not installed by default if you are using WAMP/XAMPP. So you need to install manually by downloading it from HERE.

    For more details on how to proceed check this step by step tutorial.