# Error connecting to Database--then not!

**URL:** <https://community.localwp.com/t/error-connecting-to-database-then-not/9403>\
**Category:** Uncategorized\
**Created:** [November 12, 2018, 3:16pm UTC](https://community.localwp.com/t/error-connecting-to-database-then-not/9403 "2018-11-12T15:16:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlanS](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@AlanS](https://community.localwp.com/u/AlanS)\
**Post date:** [November 12, 2018, 3:16pm UTC](https://community.localwp.com/t/error-connecting-to-database-then-not/9403/1 "2018-11-12T15:16:36Z")

</div>

For one of my Local sites, every time I start up Local, then that particular site, I get an “error establishing connection to database” message. I then stop the site, which gives me a pop-up error message about a problem with the database. Then I start the site again, and everything works like a charm. What is up with that? At this point, starting, stopping and restarting that site has become part of my “work flow”!

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [November 12, 2018, 5:37pm UTC](https://community.localwp.com/t/error-connecting-to-database-then-not/9403/2 "2018-11-12T17:37:09Z")

</div>

@AlanS,

It sounds like the database may be still starting up after the first error. Have you tried refreshing after 15 seconds or so?

---

<div class="post-metadata">

**Author:** ![AlanS](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@AlanS](https://community.localwp.com/u/AlanS)\
**Post date:** [November 13, 2018, 4:11am UTC](https://community.localwp.com/t/error-connecting-to-database-then-not/9403/3 "2018-11-13T04:11:50Z")

</div>

That looks like it worked. But why would it not be happening with all my sites?

---

<div class="post-metadata">

**Author:** ![AlanS](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@AlanS](https://community.localwp.com/u/AlanS)\
**Post date:** [November 16, 2018, 3:17am UTC](https://community.localwp.com/t/error-connecting-to-database-then-not/9403/4 "2018-11-16T03:17:11Z")

</div>

Hi @Clay,

Actually, that didn’t fix the problem. Sometimes, even after I wait, I get the error message. Then I stop the site, restart it, and it seems to work fine.
