# Error establishing database connection on Mac

**URL:** <https://community.localwp.com/t/error-establishing-database-connection-on-mac/41342>\
**Category:** Support\
**Created:** [February 12, 2024, 4:58pm UTC](https://community.localwp.com/t/error-establishing-database-connection-on-mac/41342 "2024-02-12T16:58:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brucemiracle](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@brucemiracle](https://community.localwp.com/u/brucemiracle)\
**Post date:** [February 12, 2024, 4:58pm UTC](https://community.localwp.com/t/error-establishing-database-connection-on-mac/41342/1 "2024-02-12T16:58:57Z")

</div>

### What issue or error are you experiencing?

test site opens fine. very complex and large site get this error, after wiping and restoring entire Mac os rebuild. I’ve tried restoring all files from earlier, previously-working versions with no success. Attempting to Open site or WPAdmin gets the same result. Tried changing ngnix to Apache and different PHP versions, no joy. Local version Version 8.2.1+6583, Mac OS Sonoma 14.3.1.  
[local-logs.zip](https://community.localwp.com/uploads/short-url/dCsR0gZyVOhsz6odJ47AByDUOMZ.zip) (106.5 KB)

* * *

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

t

* * *

### System Details

- **Local Version:**

- **Operating System (OS) and OS version:**

* * *

### Local Logs

Attach your Local Logs here ([Help Doc - Retrieving Local’s Log](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/))

* * *

_ **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.

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [February 14, 2024, 10:58pm UTC](https://community.localwp.com/t/error-establishing-database-connection-on-mac/41342/2 "2024-02-14T22:58:00Z")

</div>

Hi @brucemiracle

How “complex and large” is this site? Is there anything on it that could be optimized through alternative methods like SSH/SFTP?

Is this a multisite?

It might be causing some performance troubles you could test out here:

> **[Troubleshoot: Performance Issues](https://localwp.com/help-docs/troubleshooting/troubleshooting-performance-issues-in-local/)**
>
> Performance issues can be hard to fix! The best thing to do is zero in on where the slowness is occurring. Here are some suggestions to help set you up for success and ensure things are running as…

For some suggestions around optimizations, you can down below on this article:

> **[Large sites and Local](https://localwp.com/help-docs/troubleshooting/working-with-large-sites-in-local/)**
>
> Large sites can sometimes be difficult simply due to their size. The bigger the site the longer things can take and you may need a few options to get things done quicker. Table of Contents: There isn’…

---

<div class="post-metadata">

**Author:** ![brucemiracle](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@brucemiracle](https://community.localwp.com/u/brucemiracle)\
**Post date:** [February 15, 2024, 12:38am UTC](https://community.localwp.com/t/error-establishing-database-connection-on-mac/41342/3 "2024-02-15T00:38:32Z")

</div>

Hi Nick,  
500+ blog entries, 800 media library items, like that. Not multi-site.  
As it turns out, the main problem appears to have been Elementor CSS related, and rebuilding those tables fixed most of the problem. However, in my troubleshooting efforts, I deleted and reinstalled Local, which had the effect of making the previous sites invisible and inaccessible… I had to zip the entire site and reimport it into Local and then that basically worked.

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [February 15, 2024, 2:33pm UTC](https://community.localwp.com/t/error-establishing-database-connection-on-mac/41342/4 "2024-02-15T14:33:39Z")

</div>

Glad to hear it @brucemiracle! Thank you for coming back and updating on what worked here.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [February 17, 2024, 2:34am UTC](https://community.localwp.com/t/error-establishing-database-connection-on-mac/41342/5 "2024-02-17T02:34:04Z")

</div>

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