I started an instance of ecazon ec2 and installed postgresql 9.1 above it. Then I went to the Security Group: quicklaunch-1 (there was one more default`, which I did not change) and opened TCP port 5432, the table looks like this:
(Service) Source Action 22 0.0.0.0/0 Delete 5432 0.0.0.0/32 Delete 5433 0.0.0.0/32 Delete 6432 0.0.0.0/32 Delete
I created a database and a user. My /etc/postgresql/9.1/main/pg_hba.conf looks like this:
# Database administrative login by Unix domain socket local all postgres peer
and /etc/postgresql/9.1/main/postgresql.conf looks like this:
# - Connection Settings - listen_addresses = '*'
Then I try to connect to the remote computer as follows:
psql -h ec2-xxx-xx-xxx-xxx.compute-1.amazonaws.com -d <database_name> -U <username>
where ec2-xxx-xx-xxx-xxx.compute-1.amazonaws.com is my public DNS .
The above command does not lead to any connections, how can I connect?
whatf
source share