I have the following setup
- Windows 8
- Oracle VM virtual box with arch Linux running on it
- Installed and configured PostgreSQL on Linux
- Setup the ports in virtual box so that
- 45432 port on windows goes to 5432 on Linux
- 40022 port on windows goes to 22 on Linux
- On Linux PostgreSQL, I have created user
- Firewall is shut down on windows.
The problem is that I am trying to connect from
intellij idea using JDBC PostgreSQL driver, just trying test connection to address:
jdbc:postgresql://127.0.0.1:45432/mydb username: erjik password: xx
However, the test connection fails.
pg_hba.conf goes unchanged after installation with following settings:
local all all trust // IPv4 host all all 127.0.0.1/32 trust // IPv6 host all all ::1/128 trust
In postgresql.conf I have set only this settings:
listen_addresses = '*'
port = 5432
What could be the reason of connection attempt fail? Maybe I missed some settings.
EDIT1: on Linux side the command:
psql -h localhost -U erjik mydb