Local Community

Can't log in - Error establishing a database connection

Issue Summary

Hi, so I am building a website. For now only has 4 pages, almost empty. Today I was playing with building a gallery ( I’m using Divi) all good . saved my work and left. Now I open local and press wp admin and show the error - Error establishing a database connection.
I try to open the database adminer and says No connection could be made because the target machine actively refused it when I try to log in!!
No idea what I did as I haven’t did much on the website, except for some images and haven’t change nothing on the database.
Any help?
Thank you

System Details

  • Which version of Local is being used?

  • What Operating System (OS) and OS version is being used?

    • Windows 11
  • Attach the Local Log. See this Help Doc for instructions on how to do so:

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

I also had the same issue. I uninstalled local and reinstalled an earlier version. That worked for me.

Hi Ricardo! Welcome to the Local Community! :wave:

Thank you for bringing your question here.

That type of error typically means something is preventing you from connecting to the port assigned to that site.

Have you tried completely closing out of Local and restarting the site?

Feel free to drop a screenshot of what you’re seeing as well to help isolate the issue.

You could also try what @Jrt suggested, although I would recommend backing up your site first. You can do that by following these steps:

Let me know how that all goes!

:woman_technologist:t3: Sam