# Error installing ghost: connect ECONNREFUSED 127.0.0.1:3306

**URL:** <https://forum.ghost.org/t/error-installing-ghost-connect-econnrefused-127-0-0-1-3306/43587>\
**Category:** Using Ghost\
**Created:** [December 23, 2023, 3:53pm UTC](https://forum.ghost.org/t/error-installing-ghost-connect-econnrefused-127-0-0-1-3306/43587 "2023-12-23T15:53:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![barty](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@barty](https://forum.ghost.org/u/barty)\
**Post date:** [December 23, 2023, 3:53pm UTC](https://forum.ghost.org/t/error-installing-ghost-connect-econnrefused-127-0-0-1-3306/43587/1 "2023-12-23T15:53:22Z")

</div>

Hi, I am having issues with installing Ghost. I tried using 127.0.0.1 over localhost after looking through other people experiencing this issue but no improvement. MySQL (MariaDB) is installed and reachable.

```auto
One or more errors occurred.

1) ConfigError

Error detected in the production configuration.

Message: connect ECONNREFUSED 127.0.0.1:3306
Configuration Key(s): database.connection.host / database.connection.port
Current Value(s): 127.0.0.1 / 3306

Help: Ensure that MySQL is installed and reachable. You can always re-run `ghost setup` to try again.

2) GhostError

Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED 127.0.0.1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_partyrealms-com -n 50

Debug Information:
    OS: Ubuntu, v22.04.3 LTS
    Node Version: v18.19.0
    Ghost Version: 5.75.2
    Ghost-CLI Version: 1.25.3
    Environment: production
    Command: 'ghost install'

```

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [December 23, 2023, 4:11pm UTC](https://forum.ghost.org/t/error-installing-ghost-connect-econnrefused-127-0-0-1-3306/43587/2 "2023-12-23T16:11:55Z")

</div>

> [@barty](#):
>
> MySQL (MariaDB) is installed and reachable.

That’s the point, it’s not. Ghost can’t connect to the database. Are you certain the database is listening on 127.0.0.1?

---

<div class="post-metadata">

**Author:** ![barty](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@barty](https://forum.ghost.org/u/barty)\
**Post date:** [December 23, 2023, 4:15pm UTC](https://forum.ghost.org/t/error-installing-ghost-connect-econnrefused-127-0-0-1-3306/43587/3 "2023-12-23T16:15:27Z")

</div>

Problem fixed, MariaDB was failing to start after a reboot. Thanks.
