0
0

More than 3 years have passed since last update.

ubuntu にpostgresqlを入れるのの初期設定。

Last updated at Posted at 2020-07-15

先にpeer関連で弾かれることを書きましたが、初期設定のことも書いておきます。
とりあえず、postgres のパスワードから。

~ ❯❯❯ sudo passwd postgres
New password: 
Retype new password: 
passwd: password updated successfully
~ ❯❯❯ 

postgres でログインの後、psql。

 ❯❯❯ sudo -u postgres -i
[sudo] password for ma: 
postgres@local:~$ psql
psql (12.3 (Ubuntu 12.3-1.pgdg20.04+1))
Type "help" for help.

postgres=# 

あとは ALTER USER postgres with encrypted password 'my_password';

role を追加する場合

CREATE ROLE yourRoll WITH LOGIN PASSWORD 'somePass';
ALTER ROLE yourRoll WITH someRoll;
0
0
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
0
0