Brand new install missing mySQL DB with no error during install

Apologies, I’m posting this issue retrospectively so don’t have terminal outputs to share directly, only screenshots from my notes as I went.

I’m installing a brand new ghost blog on AWS free tier to look for alternative hosting options. I’ve had this work OK in the past (approx 1yr ago). This time however, I have been unable to get a working Ghost instance out of the box as no DB is created during setup?

Steps so far
I am following the official Ghost install guide: How to install & setup Ghost on Ubuntu 16.04, 18.04, 20.04 or 22.04
I have destroyed the VM and rebuilt from scratch multiple times but encounter the same issue where Ghost will not start due to unable to connect to Database.

> ? Do you want to start Ghost? Yes
> * sudo systemctl start ghost_www-autojumbled-co-uk
> * sudo systemctl stop ghost_www-autojumbled-co-uk
> ✖ Starting Ghost
> One or more errors occurred.
> 1. CliError
> Message: Error trying to connect to the MySQL database.
> Help: You can run `ghost config` to re-enter the correct credentials. Alternatively you can run `ghost setup` again.
> 1. ProcessError
> Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#' /etc/letsencrypt/ --issue --home /etc/letsencrypt --server letsencrypt --domain []( --webroot /var/www/ --reloadcmd "nginx -s reload" --accountemail [](
> [Tue Nov 22 22:30:59 UTC 2022] []( error: Fetching Timeout during connect (likely firewall problem)
> [Tue Nov 22 22:30:59 UTC 2022] Please add '--debug' or '--log' to check more details.

My investigation found the Ghost Database did not exist - it was not created during the “Ghost install” command run - no error was produced during this command. I was prompted as normal to enter DB name, user etc.

I have since manually created the Ghost DB using:

sudo apt-get install -y mysql-server
CREATE DATABASE autojumbled_co_uk
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘PASSWORD REMOVED’;

I have then run “Ghost setup” successfully and Ghost starts with no errors.

The situation is now that I have an operating Nginx page but no Ghost blog!
The Nginx page is returned only when hitting - all other variations of the address (https or www.) return bad gateway errors and so on.

Ideally, I would like to restart the instance build from scratch again and have it so the DB is created correctly as part of the install process - how can I ensure this happens? Is there an error in the latest Ghost version?

Setup Details

  • What’s your URL? This is the easiest way for others to debug your issue
  • What version of Ghost are you using?
Ghost-CLI version: 1.23.1
Ghost version: 5.24.0 (at /var/www/
  • What configuration?
    AWS hosted
    Ubuntu 20.04
    Node v16.18.1
    mySQL 8 (i think)


> + sudo systemctl is-active ghost_www-autojumbled-co-uk
> ┌───────────────────────┬────────────────────────────┬─────────┬──────────────────────┬───────────────────────────────┬──────┬─────────────────┐
> │ Name                  │ Location                   │ Version │ Status               │ URL                           │ Port │ Process Manager │
> ├───────────────────────┼────────────────────────────┼─────────┼──────────────────────┼───────────────────────────────┼──────┼─────────────────┤
> │ www-autojumbled-co-uk │ /var/www/ │ 5.24.0  │ running (production) │ │ 2368 │ systemd         │
> └───────────────────────┴────────────────────────────┴─────────┴──────────────────────┴───────────────────────────────┴──────┴─────────────────┘
  • What browser?

no thoughts from anyone about my issue? :frowning: