database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 3473 게시물 읽기
No. 3473
Re: [질문]createdb에러...
작성자
정재익(advance)
작성일
2001-10-10 09:12
조회수
2,578

postgres 계정으로 createdb 를 하셨는지요.

그렇지 않다면 DB creation privilege 를 가진 DB user 계정으로 createdb 를 시행하셔야 합니다. 아마도 그렇지 않은 것 같은 생각이 많이 듭니다.

createdb 문법은 man createdb 하시면 자세히 나와 있습니다. 참고하시기 바랍니다.

 

  SYNOPSIS
       createdb [ options... ] [ dbname ] [ description ]

   INPUTS
       -h, --host host
              Specifies  the  hostname  of  the machine on which the postmaster is running. If host begins with a
              slash, it is used as the directory for the Unix domain socket.

       -p, --port port
              Specifies the Internet TCP/IP port or the local Unix domain socket  file  extension  on  which  the
              postmaster is listening for connections.

       -U, --username username
              Username to connect as.

       -W, --password
              Force password prompt.

       -e, --echo
              Echo the queries that createdb generates and sends to the backend.

       -q, --quiet
              Do not display a response.

       -D, --location datadir
              Specifies the alternative location for the database. See also initlocation(1).

       -T, --template template
              Specifies the template database from which to build this database.

       -E, --encoding encoding
              Specifies the character encoding scheme to be used in this database.

       dbname Specifies  the  name  of  the  database  to  be created. The name must be unique among all Postgres
              databases in this installation.  The default is to create a database with the same name as the cur?
              rent system user.

       description
              This optionally specifies a comment to be associated with the newly created database.

       The  options  -h,  -p,  -U, -W, and -e are passed on literally to psql(1).  The options -D, -T, and -E are
       converted into options for the underlying SQL command CREATE DATABASE [create_database(l)]; see there  for
       more information about them.

 

-- 송정훈 님이 쓰신 글:

>> 우선 저는 db는 처음입니다.

>> 저는 Securing & Optimizing LINUX 7.1 의 PostgreSql(7.1.3)의 문서를보고 설치하였읍니다.

>>

>> 첫째질문은 createdb 을 실행하였을때의 에러입니다.

>> bash-2.04$ createdb openna

>> Password:

>> ERROR: CREATE DATABASE: source database "template1" is being accessed by other users

>> createdb: database creation failed

>> bash-2.04$ psql -l

>> Password:

>> List of databases

>> Database | Owner | Encoding

>> -----------+----------+----------

>> template0 | postgres | EUC_KR

>> template1 | postgres | EUC_KR

>> (2 rows)

>>

>>

>> 두번째질문은 psql or postgres 계정에서 사용자와 비번은 잘만들어 지는데

>> 사용자명과는 다른 그사용자의 db명을 만드는 문제입니다.

>> 여기의 예제는 createdb /U new_user /E EUC_KR new_db

>> 인데 혹시 createdb -U new_user -E EUC_KR new_db

>> 아닌가요.

>>

>> ps... 다른설정은 다잘됨니다...(여러분들의 조언을 부탁합니다.)

이 글에 대한 댓글이 총 1건 있습니다.

답변감사합니다.

DB creation privilege 를 가진 DB user 계정 이란

무었을 말하는지요. 그리고 mysql에서는 db유저로 변경하여 db을사용하던데 그런 명령어는 무었인지요.

이곳의 질문에서는 잘 검색할수가 었네요..

리눅스 or 프리비에스중 포퍼먼스는 어느것이 나은

가요.. 다시한번 저의 질문에 답변을 주셰서 감사합니다.

송정훈님이 2001-10-10 13:19에 작성한 댓글입니다.
[Top]
No.
제목
작성자
작성일
조회
3487[질문]APM으로 컴파일후 잘 작동될때postgresql을 rpm으로 설치하여 php에서 작동되게 하는방범?
박상헌
2001-10-11
2128
3505┕>Re: [질문]APM으로 컴파일후 잘 작동될때postgresql을 rpm으로 설치하여 php에서 작동되게 하는방범?
yundream
2001-10-15 11:43:01
2000
3478[질문]사용자계정에서의pg_shadow사용시...
송정훈
2001-10-10
2168
3483┕>Re: [질문]사용자계정에서의pg_shadow사용시...
정재익
2001-10-11 12:17:47
2081
3485 ┕>답변 감사합니다...
송정훈
2001-10-11 15:23:53
2075
3476postmaster -i & 에대해서..
사이버
2001-10-10
2090
3479┕>Re: postmaster -i & 에대해서..
정재익
2001-10-10 17:02:21
2137
3480 ┕>Re: Re: postmaster -i & 에대해서..
사이버
2001-10-10 18:03:34
1924
3482  ┕>Re: Re: Re: postmaster -i & 에대해서..
정재익
2001-10-11 12:15:57
2172
3484   ┕>감사합니다...언제 만나면 정말 한턱 단단히 내야 할것 같군요..(내용무..)
사이버
2001-10-11 13:11:03
2083
3470[질문]createdb에러... [1]
송정훈
2001-10-10
2391
3473┕>Re: [질문]createdb에러... [1]
정재익
2001-10-10 09:12:14
2578
3474 ┕>Re: Re: [질문]createdb에러...
송정훈
2001-10-10 13:21:20
1947
3475  ┕>Re: Re: Re: [질문]createdb에러...
정재익
2001-10-10 13:56:08
1971
3477   ┕>Re: Re: Re: Re: [질문]DBA에 대한 설명 없나요... [1]
송정훈
2001-10-10 15:06:55
2106
3481    ┕>Re: Re: Re: Re: Re: [질문]DBA에 대한 설명 없나요...
정재익
2001-10-10 22:13:30
2003
3469postgres 의 안정성..? 에 관한 이야기를 듣고 싶습니다.
임경식
2001-10-10
2062
3471┕>Re: PostgreSQL의 데이터 안정성 문제
김상기
2001-10-10 03:56:56
2608
3465postgresql 설치 문제 입니다....함만 봐주세요
원조바보
2001-10-05
2121
3472┕>Re: postgresql 놈과 c 컴파일러 궁합문제
김상기
2001-10-10 04:02:42
2162
3464psql이 안돼요~
이경일
2001-10-05
1782
3467┕>Re: psql이 안돼요~
정재익
2001-10-06 13:45:59
2041
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.022초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다