Error installing ghost: connect ECONNREFUSED 127.0.0.1:3306

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.

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'

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?

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