質問編集履歴
5
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
```python manage.py migrate```を実行すると、以下のようなエラーが出てしまいます。
|
2
2
|
|
3
|
+
> File "/Users/aaa/Desktop/formpost/env/lib/python3.8/site-packages/psycopg2/__init__.py"line 126, in connect
|
4
|
+
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
|
3
|
-
|
5
|
+
django.db.utils.OperationalError: could not connect to server: Connection refused
|
4
6
|
Is the server running on host "localhost" (127.0.0.1) and accepting
|
5
7
|
TCP/IP connections on port 5432?
|
6
8
|
could not connect to server: Connection refused
|
4
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,12 +7,11 @@
|
|
7
7
|
Is the server running on host "localhost" (::1) and accepting
|
8
8
|
TCP/IP connections on port 5432?
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
10
|
調べていた所、[こちら](https://blog.fantom.co.jp/2019/06/28/if-django-displays-an-error-could-not-connect-to-server/)のサイトを見つけたのですが、自分の環境には「/etc/postgresql/」が存在しておらず、修正が出来ませんでした...
|
14
11
|
何故、このようなエラーが発生してしまったのか分からない為、ご助言頂けましたら幸いです。
|
15
12
|
よろしくお願します。
|
13
|
+
【**追記①**】
|
14
|
+
「psql --version」こちらの結果「psql (PostgreSQL) 12.2」と表示されていたことから、postgresqlはインストールされているものと思われます。
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
何故かコードブロックを使うと、表示が崩れてしまう為、settings.pyのDATABASE部分は、画像にて貼らせて頂きます。
|
17
|
+

|
3
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,4 +15,4 @@
|
|
15
15
|
よろしくお願します。
|
16
16
|
|
17
17
|
|
18
|
-
**追記です**
|
18
|
+
【**追記です**】```psql --version``` こちらの結果```psql (PostgreSQL) 12.2```と表示されていたことから、postgresqlはインストールされているものと思われます
|
2
書式の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,9 +7,12 @@
|
|
7
7
|
Is the server running on host "localhost" (::1) and accepting
|
8
8
|
TCP/IP connections on port 5432?
|
9
9
|
|
10
|
+
|
11
|
+
|
12
|
+
|
10
13
|
調べていた所、[こちら](https://blog.fantom.co.jp/2019/06/28/if-django-displays-an-error-could-not-connect-to-server/)のサイトを見つけたのですが、自分の環境には「/etc/postgresql/」が存在しておらず、修正が出来ませんでした...
|
11
14
|
何故、このようなエラーが発生してしまったのか分からない為、ご助言頂けましたら幸いです。
|
12
15
|
よろしくお願します。
|
13
16
|
|
14
|
-
|
17
|
+
|
15
|
-
```psql --version```こちらの結果```psql (PostgreSQL) 12.2```と表示されていたことから、postgresqlはインストールされているものと思われます
|
18
|
+
**追記です**。```psql --version``` こちらの結果```psql (PostgreSQL) 12.2```と表示されていたことから、postgresqlはインストールされているものと思われます
|
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,4 +9,7 @@
|
|
9
9
|
|
10
10
|
調べていた所、[こちら](https://blog.fantom.co.jp/2019/06/28/if-django-displays-an-error-could-not-connect-to-server/)のサイトを見つけたのですが、自分の環境には「/etc/postgresql/」が存在しておらず、修正が出来ませんでした...
|
11
11
|
何故、このようなエラーが発生してしまったのか分からない為、ご助言頂けましたら幸いです。
|
12
|
-
よろしくお願します。
|
12
|
+
よろしくお願します。
|
13
|
+
|
14
|
+
**追記です**
|
15
|
+
```psql --version```こちらの結果```psql (PostgreSQL) 12.2```と表示されていたことから、postgresqlはインストールされているものと思われます
|