Skip to content

Instantly share code, notes, and snippets.

@erranddev
Forked from abhianair/file.txt
Created March 12, 2024 05:28
Show Gist options
  • Select an option

  • Save erranddev/292e43f1cd87ffbf3778f2e9f2e2b1f1 to your computer and use it in GitHub Desktop.

Select an option

Save erranddev/292e43f1cd87ffbf3778f2e9f2e2b1f1 to your computer and use it in GitHub Desktop.

Revisions

  1. @abhianair abhianair revised this gist Sep 9, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion file.txt
    Original file line number Diff line number Diff line change
    @@ -41,4 +41,4 @@
    -> password -> postgres password ( database password NOT USER PASSWORD)


    $$$$$$$ IF NONE OF THIS ABOVE WORK CONTACT BATMAN, HE HAVE ALL THE WAYS OF KILLING ALL THINGS. $$$$$$$$$$$
    $$$$$$$ IF NONE OF THIS ABOVE WORK CONTACT BATMAN, HE HAVE ALL THE WAYS OF KILLING THINGS WHICH ARE AGAINST THE UNIVERSE. $$$$$$$$$$$
  2. @abhianair abhianair created this gist Sep 9, 2020.
    44 changes: 44 additions & 0 deletions file.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    1) Login to your droplet with super admin privilage.

    2) Navigate to /etc/postgresql/{version}/main.

    3) open postgresql.conf sudo nano postgresql.conf

    add line

    listen_addresses = '*'

    Save and Exit.

    4) open ph_hba.conf sudo nano pg_hba.conf

    add line

    host all all all md5

    save and exit.

    5) Allow TCP connection though port 5432

    sudo ufw allow 5432/tcp

    6) Restart postgresql service

    sudo service postgresql restart

    7) Now open your pgadmin application in your client machine.4

    8) Object -> Create -> Server

    9) Unside Popup.

    -> Fill name (any)
    -> Goto Connection
    -> Fill Hostname with your server IP
    -> Port 5432
    -> Maintance Database -> Database name -> Defalt is postgres
    -> Username -> postgres (database username NOT SERVER USER NAME)
    -> password -> postgres password ( database password NOT USER PASSWORD)


    $$$$$$$ IF NONE OF THIS ABOVE WORK CONTACT BATMAN, HE HAVE ALL THE WAYS OF KILLING ALL THINGS. $$$$$$$$$$$