LoginSignup
1
1

More than 3 years have passed since last update.

Postgres SQL で ユーザとデータベースを作成し、ユーザにデータベースを割り当てる方法

Posted at
$ psql -U postgres
ユーザ postgres のパスワード:
psql (11.3)
"help" でヘルプを表示します。

postgres=# CREATE USER my_username WITH PASSWORD 'my_password';
postgres=# CREATE DATABASE database_name;
postgres=# GRANT ALL PRIVILEGES ON DATABASE "database_name" to my_username;
1
1
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
1
1