Local Community

Need help! Error establishing a database connection"

Hello, I shut down my computer two days ago and have not been able to access WordPress since then. When I click on the Flywheel admin or try to view the site I keep getting this error message (error establishing a database connection). I tried to refresh and restart it several times but no luck. I downloaded local by Flywheel 2 weeks ago and purchased a plugin LearnDash LMS the day after. I have NO IDEA what I am doing on the tech-side, so I apologize in advance if I’m not able to provide you with the info you need in this message. Unfortunately, I have yet to back anything up so I am very concerned about loosing the work I’ve done so far. Can you PLEASE HELP? Thank you!

Hey @msmichelle, thanks for hanging with us. Just to catch up to speed from what we’ve talked about so far (in the support ticket) - we’re clarifying that when we reference Flywheel, we’re talking about things that happen in the Flywheel app (https://app.getflywheel.com) or on a site that is hosted on Flywheel. When we refer to Local, we’re talking about the application on your computer, or a site that only exists there in a local environment. And finally, WordPress or the WP Admin, refers to the software that the site runs on, within Local.

Ok… We’ve also reinstalled Local (with the latest version, 3.3.0) and VirtualBox and are at a place where we know other sites are working, but the one you installed LearnDash is not.

At this point, we’re probably going to need to dive into the Local and site logs to get a better idea what’s going on. Can you please provide your local-by-flywheel.log file? See this Community Forum post for instructions on how to do so:

Also, can you provide a zip of the logs folder under the site’s folder? You should see logs next to app.

Ok thank you. I have attached local-by-flywheel.log
local-by-flywheel.log.zip (12.8 KB)

Can you also provide us a zip of the logs folder under the site’s folder on your computer?

Oh sorry, I thought I attached that an hour ago. I will try it again!

local-by-flywheel.log.zip (12.8 KB)

Hey @msmichelle

Thanks for uploading those logs. Can you try restarting the VM by going to “Help > Restart Local Machine”.

If that doesn’t work, then follow the steps outlined in this topic to forcefully shut down and restart the VM:

If that doesn’t work, can you provide an updated version of the Local log, as well as the individual site logs?

To get the site logs do this:

  1. Right-click on the site in Local and select “Reveal in Finder”
  2. Right-click on the folder that says logs and compress it into a zip file
    3 Upload the zip file of those site logs

Let me know how restarting the Virtual Machine goes, or if you have any other questions!