8
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PG::InsufficientPrivilege: ERROR: permission denied to create database

Last updated at Posted at 2019-04-11

#PG::InsufficientPrivilege: ERROR: permission denied to create databaseの解決
PG::InsufficientPrivilege: ERROR: permission denied to create database
これを解決するためには、データベースユーザにデータベースの作成権限を付与します。次のように、PostgreSQLのターミナルでALTER ROLEによりCREATEDBオプションを付与します。

$ sudo -u postgres psql
と入力し、続けて
postgres=# ALTER ROLE <ユーザー名> WITH CREATEDB;
と入力すると
ALTER ROLE
と出力される。

この後
\du
にて実際に権限が付与されているか確認できます。

8
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?