Support » Localhost Installs » Recover MAMP databases from backup drive

  • Resolved thorirv


    The search engine doesn’t seem to find what I’m missing and understandably so because to be honest I don’t quite know what to look for. So any help troubleshooting this would be much appreciated.

    Here goes..

    • My previous computer crashed and now I’m trying to rebuild from a backup drive.
    • For localhost sites I was using MAMP 4 (not Pro) and have installed it on the new computer, as well as finding and moving the databases. However, when trying to open a WordPress site it goes directly to install, as if it was a fresh install (but not quite, as the db exists but *is* empty, see next).
    • Selecting a database in the left hand menu in phpMyAdmin, the dropdown shows the tables as expected while the main window displays an error message: “No tables found in database.”
    • Selecting a table in the left hand menu returns two error messages, “No index defined!” and “No partitioning defined!” as well as a long list of warnings messages below.
    • db folder is within the MAMP directory in Applications (unchanged), but web server root is under user (same as prevoius computer).

    Mac OS High Sierra (10.13.6) on both computers in question.

Viewing 4 replies - 1 through 4 (of 4 total)
  • you just need to go to MAMP > db > mysql folder and in there will be all your databases.



    Thanks @jaycbrf.

    I know, I’ve already moved them (see list).

    To clarify:
    MAMP is already installed on the new computer, and works as expected when setting up a new localhost install.

    The copied databases from the old computer, however, don’t work out of the box.

    Therefore I was wondering if there was a config file somewhere that needed to be changed, or if it was necessary to run a find/replace on the DBs, given that the old drive’s name doesn’t match the new one, neither does the user. As you might see by now I’m no MySQL expert.

    • This reply was modified 2 years ago by thorirv.

    You have to import them via phpMyAdmin. There is a php script called SearchReplaceDB that you can find here.

    After you import the DB and update config.php you place the downloaded php file in the root folder and run the script




    I was in contact with the Appsolute support team (kudos to them for responding to non–Pro inquiries) and they pointed out to me what I had been doing wrong.

    It turned out that I couldn’t select and copy only the database folders I needed and paste them within the db folder of the new install. Instead I had to copy and move the db folder from the backup drive to the new MAMP install, including all subfolders.

    After doing so, problem solved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Recover MAMP databases from backup drive’ is closed to new replies.