basic postgresql tips

Start and stop postgresql

Service postgres start

Add to the chkconfig
Chkconfig –level 3 postgres on

to create a first user in kubuntu/ubuntu linux, type the following:
~$ sudo su postgres -c createuser *USERNAME*

Then create a db:
~$ sudo su postgres -c createdb *DBNAME*

Then create a password for the user by connecting using psql:
~$ sudo su postgres -c psql *DBNAME*

Then alter the password:
=#ALTER USER *username* WITH PASSWORD ‘*password*‘;
=#\q

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s