Cannot connect to PostgreSQL Remotely on Amazon EC2 instance using PgAdmin

前端 未结 3 1624
故里飘歌
故里飘歌 2021-02-13 05:30

I have a micro free tier RHEL 6 instance running and have postgresql 9.2 installed using the yum instructions here: http://yum.pgrpms.org/howtoyum.php

And I am able conn

3条回答
  •  情深已故
    2021-02-13 06:13

    I Found the resolution to this problem. Two things are required.

    1. Use a text editor to modify pg_hba.conf. Locate the line:

      host all all 127.0.0.1/0 md5.

      Immediately below it, add this new line:

      host all all 0.0.0.0/0 md5

    2. Editing the PostgreSQL postgresql.conf file:

      Use a text editor to modify postgresql.conf.

      Locate the line that starts with #listen_addresses = 'localhost'.

      Uncomment the line by deleting the #, and change 'localhost' to '*'.

      The line should now look like this:

      listen_addresses = '*' # what IP address(es) to listen on;.

    Now Just restart your postgres service and it will be able to connect

提交回复
热议问题