postgresql - Can't I get to Postgres with plain psql -



postgresql - Can't I get to Postgres with plain psql -

i have give command sudo -u postgres psql in order login postgres console. have in order login postgres sudo psql or psql

the environment working on ubuntu linux 12.04

thanks in advance.

it's normal after installation, postgres user able database server. installer can't assume we'd want open access else.

to give access casual user, assuming illustration login name joe (your normal, non-priviledged user), need create corresponding user , database:

inside psql postgres administrator (with sudo -u postgres psql), issue:

create user joe; create database joe owner joe;

after that, when issuing psql @ shell prompt, connect default own database username. no longer have sudo postgres until need issue other administrator commands.

postgresql ubuntu-12.04 postgresql-9.2 postgresql-8.4

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -