teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

マークダウンの修正

2020/09/22 15:19

投稿

ChickBeans
ChickBeans

スコア1

title CHANGED
File without changes
body CHANGED
@@ -7,18 +7,20 @@
7
7
 
8
8
 
9
9
  インストール方法
10
- ①:postgres公式ページからmac OS Xの最新版12.4をインストール (https://www.enterprisedb.com/postgresql-tutorial-resources-training?cid=47)
10
+ 0. postgres公式ページからmac OS Xの最新版12.4をインストール (https://www.enterprisedb.com/postgresql-tutorial-resources-training?cid=47)
11
11
  設定項目で[postgres]とパスワードを入力した。
12
- ②:①の方法ではターミナルでpsqlと入力しても[command not found]で弾かれてしまうので、homebrewからbrew install postgresqlをインストール
12
+ 1. ①の方法ではターミナルでpsqlと入力しても[command not found]で弾かれてしまうので、homebrewからbrew install postgresqlをインストール
13
- ③: [psql --version]で確認すると[psql (PostgreSQL) 12.4]と表示されるのでコマンドを受け入れるようになりました。
13
+ 2. [psql --version]で確認すると[psql (PostgreSQL) 12.4]と表示されるのでコマンドを受け入れるようになりました。
14
14
 
15
15
  ### 発生している問題・エラーメッセージ
16
16
  サイト(http://vdeep.net/mac-postgresql)に習ってデータベースの初期設定を試みるも、パスワードを聞かれ
17
+
17
- パソコンのローカルユーザー用のパスワード
18
+ - パソコンのローカルユーザー用のパスワード
18
- ①で設定した[postgres]
19
+ - ①で設定した[postgres]
19
- 何も入力しない
20
+ - 何も入力しない
20
21
  上記3パターンを入力しても、以下のメッセージが表示されるという状況です。
22
+
21
- ```
23
+ ```terminal
22
24
  Password for user パソコンのローカルユーザー名: ********
23
25
  パスワード入力後、以下のエラーメッセージが表示される
24
26
  psql: error: could not connect to server: FATAL: password authentication failed for user "パソコンのローカルユーザー名"
@@ -27,11 +29,11 @@
27
29
  ### 試したこと
28
30
 
29
31
  実行したコマンドと結果は以下の通りです
30
- 1. initdb /usr/local/var/postgres -E utf8 ○
32
+ 0. initdb /usr/local/var/postgres -E utf8 ○
31
- 2. brew services start postgresql ○
33
+ 1. brew services start postgresql ○
32
- 3. psql ✕
34
+ 2. psql ✕
33
- 4. createuser -s -P postgres ✕
35
+ 3. createuser -s -P postgres ✕
34
- 5. createdb test_db ✕
36
+ 4. createdb test_db ✕
35
37
 
36
38
  ✕で表記した3,4,5でパスワードを求められ、弾かれ上記のエラーメッセージが表示されます。
37
39
 

1

エラーメッセージが表示される部分をより詳しく記述しました。

2020/09/22 15:19

投稿

ChickBeans
ChickBeans

スコア1

title CHANGED
File without changes
body CHANGED
@@ -19,10 +19,11 @@
19
19
  ・何も入力しない
20
20
  上記3パターンを入力しても、以下のメッセージが表示されるという状況です。
21
21
  ```
22
+ Password for user パソコンのローカルユーザー名: ********
23
+ パスワード入力後、以下のエラーメッセージが表示される
22
24
  psql: error: could not connect to server: FATAL: password authentication failed for user "パソコンのローカルユーザー名"
23
25
  ```
24
26
 
25
-
26
27
  ### 試したこと
27
28
 
28
29
  実行したコマンドと結果は以下の通りです