Change postgresql's postgres password
Tech-Today

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 to your postgres account in behalf of root:
>sudo -u postgres psql template1
//enter your password
Now you're into postgres

2.) Go into psql
>psql
>alter user postgres with encrypted password <your_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




- Run Wildfly And Postgresql In Docker
Docker is a great tool to simulate a development environment. Not only that but it also makes that environment portable by having a docker/docker-compose configuration file. And that is what this blog is all about. We will launch a pre-configured docker...

- How To Dump And Restore A Postgresql Database
To create a postgresql dump in linux, execute the following commands: Login as root user>su - postgres>pg_dump -U username -W -Z 9 -f /tmp/dump_username.dump.zip -h 127.0.0.1 dbname>passwordTo restore, execute: >psql -U username -f dump_username.dump dbnameOther...

- Database
MSSQLMSSQL equivalent of DESC in MYSQLPostgresqlChange postgresql's postgres passwordHow to install hstore in postgresql 9.1JDBC provider setting in java for postgresql, mysql and oracleHow to alter the sequence value in postgresqlOracleHow to change...

- How To Setup Your Datasource In Jboss7.x
Below are sample configurations you can use to setup postgresq, mysql data source in your jboss7.x. Where to add: 1.) If you added Jboss Tools plugin to eclipse, in server view expand Jboss Server->Filesets->Configuration->standalone.xml 2.)...

- Persist Jms Message In A Database In Glassfish
This tutorial will guide you on how to configure Java Messaging Service in Glassfish to store JMS message in a postgresql database. What you need (configured and running): 1.) Glassfish 3.1.2.2 2.) Postgresql 9.1 3.) JMS Broker (integrated with Glassfish)...



Tech-Today








.