I’ve actually managed to get recent mySQL dumps of the databases that I needed, so I don’t actually need to restore any sites in this manner anymore (I’m zipping wp-content and database.sql up and dropping them into Local), but going forward it would be nice to know that this works in case I can’t get mySQL dumps next time.
When I delete the newly created site folder as per step 3 in the above linked article, and rename the backup site folder to match what the deleted site folder was named, the container loses track of the app folder:
I thought’d I’d stop the site at this point, then start it again, and then attempt to run:
myloader -p root -d /app/sql --overwrite-tables --database local
This was the result:
There are a number of lines output below what you can see there reporting that tables do not exist, but I imagine this is due to the errors you can see output above.
It’s clear what the problem is above, the odd thing is that Local created these sql files so should be familiar with the collation, no?
Great, thanks Clay. As I mentioned previously I have managed to get dumps of the DBs so no longer have any need to do this, but it’s good to know for future reference.
hello, I have tried all of these suggestions but I still cannot restore my local websites. I have spent so many hours creating these websites, can someone please help me?
I have returned several errors each time to run the command you say to run:
-p: command not found
** (myloader:293): CRITICAL **: Error restoring loca.wp_users from file local.wp_users.sql: Duplicate entry ‘1’ for key ‘PRIMARY’ ---- 9 lines of this etc etc.
Perhaps someone can tell me how I can get the database into one file so that I can use the drag and drop method?
Having similar issue to JPS and what was discussed at the start of this thread. Im stuck and could really use some help getting my site back up. please help
Hey Clay, I’m having the same issues, and haven’t had any luck – All SQL files are present, metadata file present, metadata file deleted and recreated, and new sites are being installed as MySQL 5.6, but still getting the Critical Errors:
How do I fix newbie and I’m not understanding this post about it. I renamed file, seem like it was going to work but then a duplicate window for changing or giving permissions on my MAC pops up and denies .
Here is the error message I’m getting as well for the site please help I have a number of sites developed that I need to access like today and I’m so frustrated no clue.
Error message:
Error: Command failed: /Applications/Local.app/Contents/Resources/extraResources/site-binaries/mysql-8.0.15/bin/mysql --default-character-set=utf8 -A --skip-column-names -e SET names ‘utf8’; use local; source /Users/tyronnechisholm/Local Sites/elderberrydev/app/sql/local-schema-create.sql;
ERROR 1007 (HY000) at line 1 in file: ‘/Users/tyronnechisholm/Local Sites/elderberrydev/app/sql/local-schema-create.sql’: Can’t create database ‘local’; database exists
How do I correct?