Postgresql Tips

/etc/postgresql/9.3/main/postgresql.conf
listen_addresses = “*”
/etc/postgresql/9.3/main/pg_hba.conf
host all all 0.0.0.0/0 md5
$ psql -h example.com -p 5432 -U postgres -W <databasename>

Other important tips

Create new user

CREATE USER user_name;
GRANT ALL|SUPERUSER|CREATE ON db_name TO user_name;
ALTER DATABASE db_name OWNER TO new_user_name;
ALTER USER user_name WITH ENCRYPTED PASSWORD ‘new password’;

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store