Your Appwrite self-hosted platform uses the Docker network to isolate your container from the outside world.
As that, we first need to obtain the MariaDB internal IP. To find it run the following command on your server
$: docker network inspect appwrite_appwrite --format '{{range .Containers}}{{println .Name .IPv4Address println }}{{end}}' | grep mariadb