i can't connect to postgres database
已回答

I can't connect to a PostgresQL instance running in Docker using Datagrip.
But I can connect to it using DBeaver, using the exact same parameters!
请先登录再写评论。
connect to it using DBeaver
Hi Wuguowen666,
Could you upload the idea.log file (Help | Show Log in …) to https://uploads.jetbrains.com and share the upload ID here once done?
Upload id: 2025_10_09_Esvkn6DY5qBCE6AxLxD8JS (file: idea.log)
Do you have a system proxy set or an HTTP proxy configured in DataGrip?
Also, please try specifying 127.0.0.1 as a Host value in DataGrip or adding -Djava.net.preferIPv4Stack=true to the VM Options field under the Advanced tab in your data source properties.
I am also encountering the same issue. I’m able to connect to my PostgreSQL instance in Docker through DBeaver without any problem, using the same host, port, user, and database parameters. However, when I try connecting through DataGrip, it keeps failing to establish the connection. I’ve double-checked the JDBC driver, SSL settings, and network configurations, but nothing seems to fix it. It’s strange that one IDE works perfectly while the other refuses to connect. I’d be really interested to know if anyone has figured out why this happens or found a workaround for DataGrip. Please assist as I am not a technical person!
Hi Benstokes Pk8,
Please enable the extended logging as described here, reproduce the issue, and upload the idea.log file (Help | Show Log in …) to https://uploads.jetbrains.com. Once you have done so, share the upload ID here.