psql -U postgres で接続できない
サーバー起動
とりあえずpostgresSQLのサーバーを起動
10分くらいサーバー起動せずにCommand叩いてました。笑
$ postgres -D /usr/local/var/postgres
接続できない。
roleのpostgresが無いらしい。。。
$ psql -U postgres
psql: FATAL: role "postgres" does not exist
データベースの一覧を確認
僕の場合はこの時点でOwnerのところのユーザーを使えば接続できました。
$ psql -l
// DBのOwnerのユーザーでログイン
$ psql -U {userName} {dbName}
残る疑問
なぜデフォルトであるはずのpostgresのroleが無かったのか。
今回は別のユーザーでは入れたので問題無いけれど…
一応参考
https://eng-entrance.com/postgresql-role