HELP NEEDED on Local: can't connect to any databases anymore or import them after computer shut down unexpectedly

Hi,

I’m using Local by Flywheel to locally develop several websites. This morning, my computer shut down because it had no more battery. I was working on a website on Local when this happened. When I gave some juice back to my computer, all windows reopened but the website I was working on just showed “error connecting to the database”. Decided to reboot Local and when clicking “Stop site” beforehand, got this message :

Uh-oh! Local ran into an issue while exporting this site’s database to the site’s ‘app/sql’ directory.
Error: Error: mysqldump exited with non-zero exit code.
at exports.default. (/Applications/Local.app/Contents/Resources.app.asar/main/sites/database/SiteDatabaseService.js:1:1:1762)
at Generator.next ()
at o (/Applications/Local.app/Contents/Resources.app.asar/main/sites/database/SiteDatabaseService.js:1:124)
at processTicksAndRejections (internal/process/task_queues.js:85:5)

Screen Shot 2020-08-14 at 11.37.39

Decided to check the website database with “Open Adminer” but authentification was required, put all the correct credentials in the fields but connection was refused as I got this window:

Screen Shot 2020-08-14 at 15.27.34

Tried to import the local.sql database into MAMP phpMyadmin to check it but got an error and couldn’t import it.

Screen Shot 2020-08-14 at 15.34.14

Meaning, I can’t access wordpress, I can’t access the database, I can’t access nothing!!!

Turned out that for the other sites I’m developing on Local, WordPress can access the database as the websites show no connection error to the database in the browser but I have the exact same problem trying to open all the databases in “Open Adminer” (connection refused) and same if I tried to import whatever Local database in phpMyAdmin.

To put it in a nutshell, I can’t even transfer my websites and their content to another server because the databases can’t be imported.

On the website that showed the database connection error in the browser, I tried to make a new install of the site on Local using (local.sql + wp-content folder). Was successful doing it, the website didn’t show the database connection error message, but all content modifications I’ve made for the last wek was gone and, same as for the other websites, database can’t be accessed with Open Adminer or imported in Mamp phpMyAdmin… I’m stuck and feel like I’ve lost all my websites for a battery problem. Can’t understand how this can happen…

Tried to uninstall and install Local, nothing. Tried to reboot the computer, nothing. Followed what is recommended to do when the database connection error appears in WordPress, but still no improvement.

Any idea on what happened? Feels like the problem is with Local. Any idea really would be greatly appreciated !
I’ve read on issue happening with Local when the computer was forced to shut down, but there was no answer as how to solve the problem…

I’m working on:
MacOS High Sierra 10.13.6
Local version 5.6.10+4674

Thanks!

Hi fanny,

Sorry for the database issues you’ve faced, I’m going to try my best to try to help you out!

The issue you encountered tends to happen when MySQL is shutdown improperly. This can happen due to a power or battery issue like you encountered, or a number of other situations. The good news is depending on the type of database tables all might not be lost.

Could you try starting one of the broken sites, then copying Local’s logs to a forum post? More details on how to do this can be found here: How do I retrieve Local's log file?

This will help us determine what the best next step would be. Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.