Logicalwebhost Cheatsheet

Linux & Open Source Cheatsheets & Howto's

Skip to: Content | Sidebar | Footer

PostgreSQL howto

PostgreSQL is a handy database that can use reasonably large data sets and has good community support. Its syntax is different from mySQL if that’s what you’re used to, but it works the same basically.

setting up PostgreSQL

This is on Debian/Ubuntu variants:

apt-get install postgresql

Now you have to set it up. Connect to it like:

sudo -u postgres psql template1

Now login and change your root password like:

sudo -u postgres psql
Password: 
psql (9.4.5)
Type "help" for help.
postgres=# ALTER USER postgres with encrypted password 'your_password';