Error establishing database

What issue or error are you experiencing?

‘Error establishing a database connection’

I have downloaded the public_html folder from a live site hosted by siteground in a zip. That site has a custom api integration with a third party application.

I then used that zip to setup a new site. I set custom settings in local wp to match the live site.

The site hung on ‘setting up site’ or something for an hour or so. I restarted local wp, run the site. Then I get the error message.

I noticed the local database was empty when I opened ‘adminer’. I thought I could resolve it by importing the database sql file I then changed the database name to local in wp-config. The import was a success. However, I still get the same error message.


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


database


System Details

  • Local Version:
    8.2.1

  • Operating System (OS) and OS version:
    Windows 10


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

local-lightning.log (188.4 KB)


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.

Hi @minglis

Do you have any antivirus, security, or firewall applications that could be blocking Local? It looks like from the log it might be having trouble connecting.

More details about troubleshooting this here: Router Mode

Are you running other developer applications simultaneously? That could also cause similar issues. Apps like MAMP, XAMPP, or Docker for example.

We do have a few strict IT policies, I will check that out.

If your IT department needs to know what domains or ports Local makes use of this comment and help doc should provide some detail:

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