我为我的Ubuntu 16.10安装了pgadmin4并在http://127.0.0.1:5050/browser/上运行它,但它只有服务器组。我创建了服务器,但它像图片一样提醒。
Unable to connect to server:
could not connect to server: Connection refused
Is the server running on host "htphuocdl-desktop" (127.0.1.1) and accepting
TCP/IP connections on port 5432?
答案 0 :(得分:0)
import os
DATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/'))
LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')
SQLITE_PATH = os.path.join(DATA_DIR, 'pgadmin4.db')
SESSION_DB_PATH = os.path.join(DATA_DIR, 'sessions')
STORAGE_DIR = os.path.join(DATA_DIR, 'storage')
SERVER_MODE = True
#Please provide default IP or custom IP address
DEFAULT_SERVER='127.0.0.1'