Error:must be owner of database

生来就可爱ヽ(ⅴ<●) 提交于 2020-02-21 11:21:07

问题


I want to delete a particular database which I have named 'mysitedb' so what I did is I opened the terminal and entered the command 'dropdb mysitedb' then the error 'ERROR: must be owner of database mysitedb' pops up. I know the username and pass for the particular database but don't have a clue on deleting it. I am new to postgresql. be gentle :P


回答1:


Q: I want to delete a particular database which I have named 'mysitedb' so what I did is I opened the terminal and entered the command 'dropdb mysitedb' then the error 'ERROR: must be owner of database mysitedb' pops up...

OK - this means you don't have the right credentials. You need the username/password of a postgresql user with permissions to delete that database.

NOTE: I know the user who owns it. Also I know the password.

WHAT??? Then who were you logged in as when you got the permissions error????

ANYWAY: you want the dropdb command:

dropdb -U db_owner_username -i [-h host] mysitedb

Here is the Postgresql documentation page:

  • http://www.postgresql.org/docs/manuals/


来源:https://stackoverflow.com/questions/36727385/errormust-be-owner-of-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!