Question : How to restart Postgres database?

Hello,

I'm newbie to Postgres. Software version is:
- PostgreSQL 7.4.2
- Conectiva Linux 10

 I'm trying to connect pgAdmin to database server, but I can't. I got error:
"FATAL: NO PG_HBA.CONf entry for host"

I found that solution is searching for the file pg_hba.conf and then add the following line:

host all all 192.168.10.1 255.255.255.0 password

Restart the PostgreSQL database. After that, connect to PostgreSQL database server through pgAdmin.

Problem is that I don't know how to restart database.

I tried:

# /etc/rc.d/init.d/postgresql stop
or
# /etc/rc.d/init.d/postgresql restart

But got the following error:

-bash: postgresql: command not found

How do I restart database?

Answer : How to restart Postgres database?

try this to restart

from linux command line - service servicename restart - make sure the service name is correct. you can type service then pos - press tab key the full service name should display then type restart.

you then need to vim the pg_hba.conf file - if only you are connecting to the database then use the postgres account you created during the installation you will be able to create other users in the database  or add the users to the hba file like this
type      database    user    ip-address                                                         method  
host      all                all        the machine you connecting from                      md5

the user that you add in th hba file is the user that you added to the database after connecting with the postgres account.

all means that all the databases and all the users can connect from this ip-address.

Random Solutions  
 
programming4us programming4us