python - Get started with Postgres in ubuntu(14.04) with psycopg2 -



python - Get started with Postgres in ubuntu(14.04) with psycopg2 -

i'm trying start learning postgres in i've spent(wasted) 6-7 hours in figuring out how start.

there many tutorials/blog etc still not getting should do.

to specific i'm still trying utilize https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04

eric@eric:~$ sudo apt-get install postgresql postgresql-contrib # succesfully installed version 9.3.5 eric@eric:~$ psql -v psql (postgresql) 9.3.5 eric@eric:~$ sudo -i -u postgres # switch user postgres postgres@eric:~$

now tried create db createdb command , other stuff. think got stuck in mess. when tried alter password user says

postgres@eric:~$ sudo passwd postgres [sudo] password postgres: sorry, seek again. [sudo] password postgres: sorry, seek again. [sudo] password postgres: sorry, seek again. sudo: 3 wrong password attempts

i want create new user(with password) , db associated this.

could explain main concept , commands setting these (able utilize script) http://www.tutorialspoint.com/postgresql/postgresql_python.htm

why don't utilize psql ?

postgres@eric:~$ psql

postgres# create role username login; postgres# \password username -- \password recommend way alter passwords in postgresql

set password confirm password

play little bit grants bit hint: default public fellow member can login database, need grant actions on tables users

python postgresql ubuntu psycopg2 postgresql-9.3

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -