Updating from 5.8.3 to 5.9.4 or higher crashes Ghost

My hosting provider who usually runs the updates for me informed me that Ghost crashes when they try to update from 5.8.3 to 5.9.4 or a higher version.
Can you help?

Here’s the log:

root@srv:~# docker logs Ghost
[2023-01-13 03:01:54] INFO Ghost is running in production…
[2023-01-13 03:01:54] INFO Your site is now available on https://e*************y.com/
[2023-01-13 03:01:54] INFO Ctrl+C to shut down
[2023-01-13 03:01:54] INFO Ghost server started in 4.637s
[2023-01-13 03:01:55] ERROR connect ECONNREFUSED
“Unknown database error”
Error ID:
Error Code:

Error: connect ECONNREFUSED
at /var/lib/ghost/versions/5.9.4/node_modules/knex-migrator/lib/database.js:57:19
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)

How have you set your container networking so that Ghost can access MySQL?

Your error shows an attempt from a docker container to connect to, but in the context of the container that IP will normally resolve to the container itself.

So is MySQL running in your container or have you otherwise configured your networking for this to work?

1 Like

We are using the official image for the docker container: Docker
But apparently we were using an SQLite database and now need to convert to a MySQL database. Is there any recommended way to go about this?
(sorry, I’m a total noob, I don’t normally work with databases)

Note that the “official” Docker image you found is not supported by the Ghost development team, but was created by members of the Docker community. On the page for that docker image, the following places are recommended to get support for it:

the Docker Community Slack, Server Fault, Unix & Linux, or Stack Overflow

There are also a number of blog posts about using the Ghost Docker image with MySQL you can check out:


See what you think about the advice you find there.


We got it to work, thank you so much for the help :slightly_smiling_face:
In the end I think it was a problem of migrating the SQLite database to MySQL. The newest Ghost version (5.29) is running on MariaDB now, which I have seen others here use as well.
The only migration issue has been losing the geo data on my members because the export doesn’t include it. But in my case it wasn’t important data, just interesting to see.