[RESOLVED] "Error establishing a database connection"

Hello,
Everything was fine until this morning where I have the famous: “Error establishing a database connection”. I do not know how to do, I look at many articles on the subject but to no avail … I am on version 3.0.4 with MacOS 10.14.3. I do not understand because I did nothing between yesterday (where it works) and today …
Here my local-by-flywheel.log : https://www.dropbox.com/s/2adwjqeu2rpx8y/local-by-flywheel.log?dl=0
Thank you in advance

P.S: If I put my website online it can solve the problem?

Théophile D.

Also, when I close the site, I get the message:

“Uh-oh! MySQL was unavailable when Local tried to get back to New_TD_MESD’s database.
Please check the local-by-flywheel.log file for more details.”

Does somebody have an idea ?
My site was almost finished and I wanted to put it online this week … I will not have the courage to start all over again.

Thank you again

Hello everyone

I finally found a simple solution that I had not found before:

  • Right click on the site name and click on “Reveal in Finder” in Local by Flywheel. Compress the folder containing all your site in a *.ZIP file (normally there must be at least the “app” and “logs” folder, sometimes “conf”).
  • In Local by Flywheel, import the site manually in FILE / IMPORT SITE, choose the Zip of your site
  • Normally, it reinstalls the site and recreates the Database … for me it’s work (on Windows and on Mac)

It’s crazy that it’s so simple and that it took me so long to find. Hoping that it can help!
I am very happy to be able to find my site, I will finally be able to put it on line.

Bye

4 Likes

@Theophile,

Sorry about this issue! I’m glad you were able to sort it out.


If anyone else runs into this issue please try the following:

  1. Right-click on the site in Local’s sidebar
  2. Enter and run the following command: rm -rf /var/run/mysqld/mysqld.*
  3. Right-click on the site in Local’s sidebar and click Restart

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