質問編集履歴
3
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -17,6 +17,24 @@
|
|
17
17
|
ユーザの作成、DBの作成等して、その情報をPythonのソース内に記載したのですが動きません。。。
|
18
18
|
|
19
19
|
ユーザ(postgrs)にもパスワードを設定しています。
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
追記
|
24
|
+
|
25
|
+
ちなみに以下のやり方でも接続ができません。以下のエラーが出てしまいます。。。。
|
26
|
+
|
27
|
+
psql -h ホスト名 -p ポート番号 -U ロール名 -d データベース名
|
28
|
+
|
29
|
+
```
|
30
|
+
|
31
|
+
psql: could not connect to server: Connection refused
|
32
|
+
|
33
|
+
Is the server running on host "xxx.xxx.xx.xxx" and accepting
|
34
|
+
|
35
|
+
TCP/IP connections on port 5432?
|
36
|
+
|
37
|
+
```
|
20
38
|
|
21
39
|
|
22
40
|
|
2
追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -155,3 +155,23 @@
|
|
155
155
|
python3.6
|
156
156
|
|
157
157
|
postgreSQL(10.6)
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
追加
|
166
|
+
|
167
|
+
ちなみにpgadmin3にも接続できません。
|
168
|
+
|
169
|
+
```
|
170
|
+
|
171
|
+
Server doesn't listen
|
172
|
+
|
173
|
+
The server doesn't accept connections: the connection library reports
|
174
|
+
|
175
|
+
could not connect to server: Connection refused Is the server running on host "xxx.xxx.xx.xxx" and accepting TCP/IP connections on port 5432?
|
176
|
+
|
177
|
+
```
|
1
追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -104,7 +104,45 @@
|
|
104
104
|
|
105
105
|
```
|
106
106
|
|
107
|
+
/var/lib/pgsql/data/postgresql.conf
|
107
108
|
|
109
|
+
↑でlisten_addressesを'*'にして port = 5432 にしてます(関係あるか分かりませんが)
|
110
|
+
|
111
|
+
```
|
112
|
+
|
113
|
+
#------------------------------------------------------------------------------
|
114
|
+
|
115
|
+
# CONNECTIONS AND AUTHENTICATION
|
116
|
+
|
117
|
+
#------------------------------------------------------------------------------
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
# - Connection Settings -
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
listen_addresses = '*' # what IP address(es) to listen on;
|
126
|
+
|
127
|
+
# comma-separated list of addresses;
|
128
|
+
|
129
|
+
# defaults to 'localhost'; use '*' for all
|
130
|
+
|
131
|
+
# (change requires restart)
|
132
|
+
|
133
|
+
port = 5432 # (change requires restart)
|
134
|
+
|
135
|
+
max_connections = 100 # (change requires restart)
|
136
|
+
|
137
|
+
#superuser_reserved_connections = 3 # (change requires restart)
|
138
|
+
|
139
|
+
#unix_socket_directories = '/var/run/postgresql, /tmp' # comma-separated list of directories
|
140
|
+
|
141
|
+
# (change requires restart)
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
```
|
108
146
|
|
109
147
|
|
110
148
|
|