no

Change postgresql's postgres password

This is how you would change your postgresql's user postgres password, in case you forgot it. This is done in ubuntu 12.04. 1.) Logon ...

This is how you would change your postgresql's user postgres password, in case you forgot it. This is done in ubuntu 12.04.

1.) Logon to your postgres account in behalf of root:
>sudo su postgres
//enter your password
Now you're into postgres

2.) Go into psql
>psql
>alter user postgres with password 


3.) Press ctrl+d and it's done.

I might as well share how to enable remote access to a postgresql server, there are 2 files that should be modified:
1.) listen to a remote ip or all

>sudo vi /etc/postgresql/9.1/main/postgresql.conf
//change listen_addresses='localhost' to listen_addresses='*'
//or specific ip listen_addresses='x.x.x.x'

2.) Allow client authentication
>sudo vi /etc/postgresql/9.1/main/pg_hba.conf
//local
host all all 127.0.0.1/32 trust
//for ipv4
host all all x.x.x.x/24 md5

Related

database 3926311220542421378

Post a Comment

item