Change Postgresql's Postgres Password

This is how yous would alter your postgresql's user postgres password, inwards representative yous forgot it. This is done inwards ubuntu 12.04.

1.) Logon to your postgres trouble organization human relationship inwards behalf of root:
>sudo su postgres //enter your password 
Now you're into postgres

2.) Go into psql
>psql >alter user postgres amongst password  
 
3.) Press ctrl+d together with it's done.

I mightiness too portion how to enable remote access to a postgresql server, at that spot are two files that should hold upward modified:
1.) psyche to a remote ip or all

>sudo 6 /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 customer authentication
>sudo 6 /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 
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.