Mariadb Container Not Able To Establish Connection In Windows

Story:
I’m Using frappe_docker for the development its running in my local im using Windows 10 Pro OS. but when im using Ubuntu I will inspect the DB IP Address using this command

docker inspect <MARIADB_CONTAINER_ID>

I will get the container details I will connect through the IP. now I’m using the in Windows 10 Pro the DB us running but I can’t able to connect in the Pycharm after that I tried to ping that IP in Command Prompt the IP is not pinging but in ubuntu its pinging and working. In windows im getting this error.

DBMS: MariaDB (no ver.)
Case sensitivity: plain=mixed, delimited=exact
Socket fail to connect to host:address=(host=localhost)(port=3306)(type=primary). Connection refused: no further information.

Please help me how to connect the DB in windows using docker

Note: Stop & Remove the previous container after done the changes in the docker-copose.yml file inside the .devcontainer folder. now Reopen The container. you can see the mariadb expose in port at 3306

$ docker ps
CONTAINER ID   IMAGE                 COMMAND                  CREATED       STATUS       PORTS                                                                          NAMES
f685857417ce   redis:alpine          "docker-entrypoint.s…"   3 hours ago   Up 3 hours   6379/tcp                                                                       frappe_docker_14_2_devcontainer-redis-cache-1
d69679f137da   frappe/bench:latest   "/bin/sh -c 'echo Co…"   3 hours ago   Up 3 hours   0.0.0.0:8000-8005->8000-8005/tcp, 6787/tcp, 0.0.0.0:9000-9005->9000-9005/tcp   frappe_docker_14_2_devcontainer-frappe-1
c9e0ac691db4   mariadb:10.6          "docker-entrypoint.s…"   3 hours ago   Up 3 hours   0.0.0.0:3306->3306/tcp                                                         frappe_docker_14_2_devcontainer-mariadb-1
149ea05cb629   redis:alpine          "docker-entrypoint.s…"   3 hours ago   Up 3 hours   6379/tcp