Spurious connection errors on mysql

I’m trying to setup a new version of ghost under k8s. I have a previous installation of version 3.x with an embedded db, and I couldn’t find a working migration path so I’ve done a manual dump and now doing a reinstall of version 5. I understand I need a full mysql on 5.x now.

I’m using the official docker image for mysql at version 8 (Docker).

Everything seems to be working fine for a bit, connections work and there’s initialization of the db up to 68 tables, but then I start getting connection errors and the app fails:

Node container:

...
[2023-03-06 09:11:59] INFO Model: Integration
[2023-03-06 09:11:59] INFO Relation: Role to Permission
[2023-03-06 09:12:02] INFO Relation: Post to Tag
[2023-03-06 09:12:02] ERROR connect ECONNREFUSED 10.43.107.77:3306

connect ECONNREFUSED 10.43.107.77:3306

"Unknown database error"

Error ID:
    500

Error Code: 
    ECONNREFUSED

----------------------------------------

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

[2023-03-06 09:12:02] WARN Ghost is shutting down
[2023-03-06 09:12:02] WARN Ghost has shut down
[2023-03-06 09:12:02] WARN Your site is now offline
[2023-03-06 09:12:02] WARN Ghost was running for a minute

The mysql container doesn’t show anything in its log of any errors.
DB:

mysql> show tables;
+----------------------------------------+
| Tables_in_ghost                        |
+----------------------------------------+
| actions                                |
| api_keys                               |
| benefits                               |
| brute                                  |
| comment_likes                          |
| comment_reports                        |
| comments                               |
| custom_theme_settings                  |
| email_batches                          |
| email_recipient_failures               |
| email_recipients                       |
| email_spam_complaint_events            |
| emails                                 |
| integrations                           |
| invites                                |
| jobs                                   |
| labels                                 |
| members                                |
| members_cancel_events                  |
| members_click_events                   |
| members_created_events                 |
| members_email_change_events            |
| members_feedback                       |
| members_labels                         |
| members_login_events                   |
| members_newsletters                    |
| members_paid_subscription_events       |
| members_payment_events                 |
| members_product_events                 |
| members_products                       |
| members_status_events                  |
| members_stripe_customers               |
| members_stripe_customers_subscriptions |
| members_subscribe_events               |
| members_subscription_created_events    |
| mentions                               |
| migrations                             |
| migrations_lock                        |
| milestones                             |
| mobiledoc_revisions                    |
| newsletters                            |
| offer_redemptions                      |
| offers                                 |
| permissions                            |
| permissions_roles                      |
| permissions_users                      |
| post_revisions                         |
| posts                                  |
| posts_authors                          |
| posts_meta                             |
| posts_products                         |
| posts_tags                             |
| products                               |
| products_benefits                      |
| redirects                              |
| roles                                  |
| roles_users                            |
| sessions                               |
| settings                               |
| snippets                               |
| stripe_prices                          |
| stripe_products                        |
| subscriptions                          |
| suppressions                           |
| tags                                   |
| tokens                                 |
| users                                  |
| webhooks                               |
+----------------------------------------+
68 rows in set (0.00 sec)

My hunch is that there’s some connection limit that the initialization strikes? Haven’t used mysql since forever and can’t seem to find anything here Resolving a misconfigured MySQL database with Ghost - Ghost Developers

Any tips highly appreciated!