Follow me as I struggle with rogue technology, insane programmers, and impossible math questions in a battle to the death.

Wednesday, May 20, 2009

Create a postgresql database

How to add postgresql user account

# adduser tom
# passwd tom

# sudo su -
(or might be # su - postgres)

$ psql -d template1 -U postgres

template1=# CREATE USER tom WITH PASSWORD 'myPassword';
template1=# CREATE DATABASE jerry;
template1=# GRANT ALL PRIVILEGES ON DATABASE jerry to tom;

template1=# \q

$ su - tom
$ psql -d jerry -U tom

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home