I was building a small personal site on my local host using MAMP. I had a bunch of content and post entries that I had put in (notes I had taken for school) but something went wrong and one day (I don't remember changing any settings prior to this) I got an error saying it couldn't access the database. The only solution I could find to this problem was to uninstall and then reinstall MAMP and WP. Before I uninstalled I copied the contents of MAMP/db/ which contained two directories called 'mysql56' and 'sqlite'. I assumed this was the mysql database for both of the sites that I was running (I'm running two different sites on localhost, both through MAMP). I have those files saved, but now I can't figure out how to get my DB back or if it's even possible at this point to recover all that content. I wasn't able to make any other type of back up of the database. Am I out of luck or is there a way to get my notes back?

I tried just copying the directories and files I saved into the new /MAMP/db/ directory, but I get a similar error saying it can't connect to the database.

  • can you show us fragments of the code in there? – prosti Dec 30 '16 at 18:40
  • What code do you want to see? – Digital Brent Dec 30 '16 at 18:43
  • from the directories you mentioned. Is any SQL code in there? – prosti Dec 30 '16 at 18:46
  • Yeah, there's like 50 different SQL files it the root of mysql56 alone, and a few more folders in there containing even more SQL. In the sqlite file there are probably 30 files in the root. Which file do you want to see? – Digital Brent Dec 30 '16 at 18:51
  • edit your question and provide the resume of your files, with some code examples – prosti Dec 30 '16 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.