PostgreSQL: Create database, connect and list (command line)
Jan 01, 2014 - by kurinchilamp / / Post Comment
Changing host configuration
$ vi /var/lib/pgsql/8.4/data/pg_hba.conf
Add postgresql to startup process
$ chkconfig postgresql-8.4 on
Start postgresql service
$ service postgresql-8.4 start
Access postgresql
$ su - postgresql
$ psql
Create database
postgres-# create database test
List databases
postgres-# \list
Exit postgresql
postgres-# \q (or \quit)
Connect to database
postgres-# \c test (\connect test)
Continue Reading