Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oleglomako/955a8f3870542c41cac792cc8eb926e7 to your computer and use it in GitHub Desktop.
Save oleglomako/955a8f3870542c41cac792cc8eb926e7 to your computer and use it in GitHub Desktop.
Проблема:
При подключении к удаленному серверу получаем ряд ошибок.
Сначала рабочее место жалуется, что сервер его не слушает,
потом, что у админа нет прав на подключение:
- "Server doesn’t listen"
- "Grant users remote access"
Решение:
1. Заходим в настройки сервера по пути
"/etc/postgresql/9.3/main/"
2. Редактируем файл postgresql.conf
Вместо:
listen_addresses = 'localhost'
Вписываем:
listen_addresses = '*'
3. Редактируем файл pg_hba.conf
Вместо:
# IPv4 local connections:
host all all 127.0.0.1 md5
Вписываем:
# IPv4 local connections:
host all all 0.0.0.0/0 md5
4. Не забываем перезагрузить.
sudo service postgresql restart
Все. С этого момента можно все и отовсюду.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment