Can't connect the db in pycharm and also intelij

Im using mac, I setup the ERPNext-13 in my machine. project working fine but I can’t able to connect the DB through Pycharm ot intelij what is the proplem. but it’s work in linux (my othere PC). is there any proplem in docker?