The above suggests one of the following:
- the mariadb container isn’t running
- your docker network configuration is broken / has changed since the last container start
- something changed with the container naming configuration
- something changed in your Nextcloud config
I suggest:
- checking your MariaDB container status and log
- describing more specifically what you upgraded (versions) and how specifically (process)
Please also post your Compose file and try to fill to out the support template.