Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > СУБД, общие вопросы > как убрать пароль в консольных командах


Автор: PyS 12.9.2006, 09:40
Добрый день!

Пожалуйста, помогите:

Я себе поставил PostgreSQL - начал работать - и меня сейчас сильно "убивает" необходимость прописывать руками пароль суперпользователя Postgres - как убрать ввод пароля руками. Может нужно где-то прописать его?

PS по форуму пошарился, но ответа не нашел smile

Автор: PyS 12.9.2006, 11:15
нашел тему:
http://forum.vingrad.ru/index.php?showtopic=100528&view=findpost&p=763993


http://www.postgresql.org/docs/8.0/interactive/libpq-pgpass.html

Добавлено @ 11:16 
разбираюсь. smile

Автор: PyS 12.9.2006, 14:27
Цитата

27.12. The Password File

The file .pgpass in a user's home directory is a file that can contain passwords to be used if the connection requires a password (and no password has been specified otherwise). On Microsoft Windows the file is named %APPDATA%\postgresql\pgpass.conf (where %APPDATA% refers to the Application Data subdirectory in the user's profile).

This file should contain lines of the following format:

hostname:port:database:username:password

Each of the first four fields may be a literal value, or *, which matches anything. The password field from the first line that matches the current connection parameters will be used. (Therefore, put more-specific entries first when you are using wildcards.) If an entry needs to contain : or \, escape this character with \.

The permissions on .pgpass must disallow any access to world or group; achieve this by the command chmod 0600 ~/.pgpass. If the permissions are less strict than this, the file will be ignored. (The file permissions are not currently checked on Microsoft Windows, however.)


перешарил весь ПК - нет у меня файла  pgpass.conf - и что теперь делать?

Автор: PyS 15.9.2006, 15:14
проблему решил.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)