콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
6 답글
45472 화면

How to drop database from ubuntu terminal.?.

아바타
취소
베스트 답변
sudo -u postgres dropdb <name>

Explanation:

  • sudo -u postgres: run the next command impersonating the postgres user
  • dropdb <name>: command to drop a PosgreSQL database
아바타
취소

What if there is a space character in the database name?

베스트 답변

You not just drop it from the webclient. Log in as administrator and drop using master password. Althernatively log into the pgAdmin III (PostgreSQL) and drop it from there. You will need admin access to in both scenarios

아바타
취소

yes,kaynis absolutely correct, but if we wish to drop it from the terminal itself, what we have to do?

베스트 답변

open your terminal. type the command "dropdb database_name". Using this command you can drop your database

아바타
취소
베스트 답변

when applied dropdb datname , but " \l "  command shows deleted datname in database list.

아바타
취소