* No PostgreSQL clusters exist; see "man pg_createcluster"


locale 확인

 sudo dpkg-reconfigure locales


After

pg_createcluster 9.X main --start


taiga@ubuntu:~$ psql -U testUser -W testDB -h localhost


psql: FATAL:  Peer authentication failed for user


옵션에 -h localhost를 붙여준다.

#DB 생성

create database testDB with encoding 'unicode' LC_COLLATE 'C' LC_CTYPE 'C' template template0;


#DB Owner 변경

alter database testDB owner to testUser;

taiga=# \du

                             List of roles

 Role name |                   Attributes                   | Member of

-----------+------------------------------------------------+-----------

 postgres  | Superuser, Create role, Create DB, Replication | {}

 taiga     | Superuser, Create role, Create DB              | {}

'Database > PostgreSQL' 카테고리의 다른 글

psql: FATAL: Peer authentication failed for user  (0) 2016.06.27
create database in postgresql  (0) 2016.06.27
postgresql user list  (0) 2016.06.27
PostgreSQL - Ubuntu Basic 설치 가정  (0) 2014.09.02
PostgreSQL Table 전체 조회  (0) 2013.03.25
PostgreSQL  (0) 2013.01.29

+ Recent posts