Error maridb docker container

I have a raspberry pi with a small home lab in Docker.
After resizing de ssd and a restart today my websites (locally) and the phpmyadmin containers can no longer access the database.
phpmyadmin gives the following error: #2003 Cannot log in to the MySQL server
The database container its self is working fine I can via portainers bash still interact with the database. And login as a user.
Somewhere between the communication of the containers something goes wrong.
other containers on the pi are pihole-unbound, bitwarden, portainer, omadacontroler.
I was unable to find a solution on the internet and hoping that one of you know a solution

The solution was relative simple. Apparently when you restart a docker server the internal IP addresses can change. This can break internal IP links between the docker containers.
So I had to change the IP address of the database container and everything worked as it should be.

When you have two containers in the same docker network. It will resolve the name you gave each container to the internal IP. That is really the way you are ment to do that.

You mean linking the containers via there docker name instead of IP address? I did follow the steps online via a YouTube video I missed that step or they didn’t mentioned it.
But it will be on my list to do, changing the settings.

Exactly.

Linking with the IP will get pretty unmanageable if you had more than 2 containers that need to talk to each other.