Connect to default PGSQL database remotely

Connect to default PGSQL database remotely


1. To be able to reach the server remotely you have to add the following line into the file: ManageEngine/ServiceDeskPlus-MSP/pgsql/data/postgresql.conf:

 

listen_addresses = '*'

 

2. PostgreSQL, by default, refuses all connections it receives from any remote address. You have to relax these rules by adding this line to [ServiceDesk Plus - MSP HOME]/pgsql/data/pg_hba.conf:

 

host all all  0.0.0.0/0 md5

So, after modifications, it should look like below,


host    all             all             127.0.0.1/32            md5

host    all             all             0.0.0.0/0                md5  

This is an access control rule that lets anyone login from any address if a valid password is provided (the md5 keyword). You can use your network/mask instead of 0.0.0.0/0 to only allow access from certain IP addresses.

 

3. When you have applied these modifications to your configuration files, you need to restart the PostgreSQL server.

 

Now, you will be able to login to your server remotely.


                    New to ADSelfService Plus?

                      • Related Articles

                      • How to Connect to SDP MSP Database ?

                        1. In-Built POSTGRES (PGSQL) : Open a CMD prompt as an administrator and navigate to ManageEngine\ServiceDeskPlus-MSP\pgsql\bin and run the below command From SDP MSP build 10538 , please use the below method. psql -h localhost -U sdpadmin -p 65432 ...
                      • Error While connecting default Postgres Database

                        If you are getting the below error while connecting the postgresDB , please follow the steps below : Error : psql: FATAL: no pg_hba.conf entry for host “::1”, user “postgres”, database “servicedesk”,SSL off Please open pg_hba.conf under [ServiceDesk ...
                      • How to connect to the ServiceDesk database?

                        Open command prompt on the server and change the directory to MangeEngine\ServiceDesk\bin, invoke the batch file 'changeDBServer.bat' For MSSQL database  Connect to the query analyzer of the SQL server and execute the queries. For PostgreSQL database ...
                      • How to connect PGSQL from a remote computer?

                        To remotely access a PostgreSQL database, you must set the two main PostgreSQL configuration files: postgresql.conf pg_hba.conf First of all, configure PostgreSQL service to listen on port 65432 on all network interfaces in Windows 7 machine: open ...
                      • How to resolve Connectivity issues with Postgresql Database from our product?

                        Log Traces Feb 20, 2024 6:40:00 PM [SYSERR] [INFO] : java.sql.SQLException: java.lang.Exception: Exception during getConnection from pool Exception occurred during get connection from datasource Nov 15, 2023 1:29:10 PM [SYSERR] [INFO] : Caused by: ...