https://iphwiki.net/index.php?title=PostgreSQL_-_Failed_to_connect_to_the_database_%27%27_FATAL:_Ident_authentication_failed_for_user_%22postgres%22&feed=atom&action=history
PostgreSQL - Failed to connect to the database '' FATAL: Ident authentication failed for user "postgres" - История изменений
2024-03-29T02:27:47Z
История изменений этой страницы в вики
MediaWiki 1.35.0
https://iphwiki.net/index.php?title=PostgreSQL_-_Failed_to_connect_to_the_database_%27%27_FATAL:_Ident_authentication_failed_for_user_%22postgres%22&diff=8584&oldid=prev
Admin iph в 17:11, 23 июня 2020
2020-06-23T17:11:04Z
<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="ru">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Предыдущая</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Версия 17:11, 23 июня 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l6" >Строка 6:</td>
<td colspan="2" class="diff-lineno">Строка 6:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Failed to connect to the database 'FATAL: Ident authentication failed for user "postgres"</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Failed to connect to the database 'FATAL: Ident authentication failed for user "postgres"</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>означает, что в конфиг файле /var/lib/pgsql/10/data/'''pg_hba.conf''' (для 10 версии) стоит запрет на подключение.<br /></div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>означает, что в конфиг файле <ins class="diffchange diffchange-inline">PostgreSQL - </ins>/var/lib/pgsql/10/data/'''pg_hba.conf''' (для 10 версии) стоит запрет на подключение.<br /></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Решение - заменить '''ident или peer''' на '''md5 или trust''' <br /></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Решение - заменить '''ident или peer''' на '''md5 или trust''' <br /></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>
Admin iph
https://iphwiki.net/index.php?title=PostgreSQL_-_Failed_to_connect_to_the_database_%27%27_FATAL:_Ident_authentication_failed_for_user_%22postgres%22&diff=8583&oldid=prev
Admin iph в 17:10, 23 июня 2020
2020-06-23T17:10:24Z
<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="ru">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Предыдущая</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Версия 17:10, 23 июня 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Строка 1:</td>
<td colspan="2" class="diff-lineno">Строка 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Файл:B_1.gif |link=https://bit.ly/3tbFsd6| Доступная цена]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== PostgreSQL - Failed to connect to the database 'FATAL: Ident authentication failed for user "postgres" ===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== PostgreSQL - Failed to connect to the database 'FATAL: Ident authentication failed for user "postgres" ===</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Ошибка при подключении к базе PostgreSQL </div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Ошибка при подключении к базе PostgreSQL </div></td></tr>
</table>
Admin iph
https://iphwiki.net/index.php?title=PostgreSQL_-_Failed_to_connect_to_the_database_%27%27_FATAL:_Ident_authentication_failed_for_user_%22postgres%22&diff=8582&oldid=prev
Admin iph: Новая страница: «=== PostgreSQL - Failed to connect to the database 'FATAL: Ident authentication failed for user "postgres" === Ошибка при подключении к б…»
2020-06-23T17:09:49Z
<p>Новая страница: «=== PostgreSQL - Failed to connect to the database 'FATAL: Ident authentication failed for user "postgres" === Ошибка при подключении к б…»</p>
<p><b>Новая страница</b></p><div>=== PostgreSQL - Failed to connect to the database 'FATAL: Ident authentication failed for user "postgres" ===<br />
<br />
<br />
Ошибка при подключении к базе PostgreSQL <br />
Failed to connect to the database 'FATAL: Ident authentication failed for user "postgres"<br />
<br />
означает, что в конфиг файле /var/lib/pgsql/10/data/'''pg_hba.conf''' (для 10 версии) стоит запрет на подключение.<br /><br />
Решение - заменить '''ident или peer''' на '''md5 или trust''' <br /><br />
<br />
Если было так:<br />
local all all peer<br />
host all all 127.0.0.1/32 ident<br />
host all all ::1/128 ident<br />
local replication all peer<br />
host replication all 127.0.0.1/32 ident<br />
host replication all ::1/128 ident<br />
<br />
<br />
то нужно заменить на<br />
local all all trust<br />
host all all 127.0.0.1/32 trust<br />
host all all ::1/128 trust<br />
local replication all trust<br />
host replication all 127.0.0.1/32 trust<br />
host replication all ::1/128 trust<br />
<br />
или на<br />
local all all trust<br />
host all all 127.0.0.1/32 trust<br />
host all all ::1/128 trust<br />
local replication all trust<br />
host replication all 127.0.0.1/32 trust<br />
host replication all ::1/128 trust<br />
<br />
<br />
и перезапустить PostgreSQL (10 версии):<br />
# systemctl restart postgresql-10</div>
Admin iph