错误:必须是数据库的所有者

我想删除一个名为’mysitedb’的特定数据库,所以我打开终端并输入命令’dropdb mysitedb’然后弹出错误’ERROR:必须是数据库mysitedb的所有者’.我知道特定数据库的用户名和传递,但没有删除它的线索.我是
postgresql的新手.温柔:P 最佳答案

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…

好的 – 这意味着您没有正确的凭据.您需要具有删除该数据库权限的postgresql用户的用户名/密码.

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

什么???然后,当你获得权限错误时,你是谁登录的?

无论如何:你想要dropdb命令:

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

这是Postgresql文档页面:

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

点赞