Latest Release Cause MYSQL issues?

Hi All,

After the latest update all of my databases have dropped out. (Ive been hosting my own ghost for 2+ years)

I’ve installed ghost with a docker-compose stack. This also appears to happen on a brand new docker-compose based fresh ghost blog configuration as well.

Can anyone verify if this is an issue / reproduce? The database is reachable via the container as confirmed via telnet to the MYSQL port and is correctly listening.

db2_1    | 2022-11-01 00:26:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
db2_1    | 2022-11-01 00:26:39+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db2_1    | 2022-11-01 00:26:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
db2_1    | 2022-11-01 00:26:40+00:00 [Note] [Entrypoint]: Initializing database files
db2_1    | 2022-11-01T00:26:40.103544Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
db2_1    | 2022-11-01T00:26:40.103628Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.31) initializing of server in progress as process 81
db2_1    | 2022-11-01T00:26:40.109594Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
db2_1    | 2022-11-01T00:26:40.553988Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
ghost_1  | [2022-11-01 00:26:40] INFO Ghost is running in production...
ghost_1  | [2022-11-01 00:26:40] INFO Your site is now available on https://xxxxx.com/
ghost_1  | [2022-11-01 00:26:40] INFO Ctrl+C to shut down
ghost_1  | [2022-11-01 00:26:40] INFO Ghost server started in 0.584s
ghost_1  | [2022-11-01 00:26:40] ERROR connect ECONNREFUSED 172.19.0.2:3306
ghost_1  |
ghost_1  | connect ECONNREFUSED 172.19.0.2:3306
ghost_1  |
ghost_1  | "Unknown database error"
ghost_1  |
ghost_1  | Error ID:
ghost_1  |     500
ghost_1  |
ghost_1  | Error Code:
ghost_1  |     ECONNREFUSED
ghost_1  |
ghost_1  | ----------------------------------------
ghost_1  |
ghost_1  | Error: connect ECONNREFUSED 172.19.0.2:3306
ghost_1  |     at /var/lib/ghost/versions/5.22.1/node_modules/knex-migrator/lib/database.js:57:19
ghost_1  |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
ghost_1  |
ghost_1  | [2022-11-01 00:26:40] WARN Ghost is shutting down
ghost_1  | [2022-11-01 00:26:40] WARN Ghost has shut down
ghost_1  | [2022-11-01 00:26:40] WARN Your site is now offline
ghost_1  | [2022-11-01 00:26:40] WARN Ghost was running for a few seconds

Just upgraded a dev Ghost from v5.21.0 to v5.22.1 using MySQL 8.0.31 on Debian stable - no probs, smooth upgrade.

You clearly are looking at the right path in that ECONNREFUSED usually means unable to contact anything on that IP/PORT.

Firewall? Container Permissions? Routing? :man_shrugging:

1 Like

Ended up recreating a new container and transferring a backup of the sql database… Unsure what happened really…

I am also experiencing this issue after updating today. Can you list the steps you took to recreate the containers?

I have tried docker-compose down and then docker-compose up again which recreated the containers but the issue was still there.

For sanity, I also spun up the default docker-compose config (Docker) and that one also gave the same error.

Hey @samr28,

Sorry I missed this in my email inbox!

Yep the default docker compose setup also caused an error for me. I left it running for a few minutes and it eventually cleared the error by connecting. I’m still unsure what the problem is up to this day…

In terms of data, I moved across all of the content folders and did a mysql dump to the host and then pushed the .sql file into the new container and ran an import.

Hey @samr28,

Did you manage to get it to work?

Alex.