5.44.0 Could Not Communicate with ghost

I have made some progress

I re-setup certbot so the site has SSL, and now when I try to run the site, I get a different error, and it fails immediately, instead of stalling for ages.

new message:

Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306
Help: Unknown database error

log output

Debug Information:
    OS: Ubuntu, v20.04.4 LTS
    Node Version: v18.16.0
    Ghost Version: 5.44.0
    Ghost-CLI Version: 1.24.0
    Environment: production
    Command: 'ghost setup'
Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_pearcemichal-com -n 50
Stack: Error: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306
    at Server.<anonymous> (/usr/local/lib/node_modules/ghost-cli/lib/utils/port-polling.js:73:28)
    at Object.onceWrapper (node:events:627:28)
    at Server.emit (node:events:513:28)
    at emitCloseNT (node:net:2135:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21)

also, when I try to run sudo mysql I get an error

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

though I don’t know if this is relevant.

EDIT:

I tried what was suggested here, but it did not resolve the issue