为什么pgAdmin III无法连接到Postgres?

时间:2018-02-21 21:21:00

标签: postgresql pgadmin

我向posgresql(amanda)添加了一个新用户,这与我的linux系统用户相同。在控制台,我可以正常打开psql - 我不需要密码,因为我已经通过身份验证amanda。当我尝试在没有密码的情况下设置pgAdmin III时,我得到:

An error has occurred:

01:18:47 PM: Error: Error connecting to the server: fe_sendauth: no password supplied

如果我提供系统密码,则会收到密码错误:

An error has occurred:

01:15:30 PM: Error: Error connecting to the server: FATAL:  password authentication failed for user "amanda"
FATAL:  password authentication failed for user "amanda"

如何让pgAdmin3与postgres交谈为amanda

1 个答案:

答案 0 :(得分:0)

不是真正的解决方案,而是一种解决方法: 因此命令行连接并更新密码:

import bs4 as bs
import urllib.request


sauce = urllib.request.urlopen('https://www.zacks.com/stock/quote/AAPL/balance-sheet')
soup = bs.BeautifulSoup(sauce,'lxml')

#Cash & Cash Equivalents
for cash_and_equivalents2017 in soup.find_all('td')[33]:
    print(cash_and_equivalents2017.string)

cash_and_equivalents2017 = cash_and_equivalents2017.string

for cash_and_equivalents2016 in soup.find_all('td')[34]:
print(cash_and_equivalents2016.string)

cash_and_equivalents2016 = cash_and_equivalents2016.string

#Receivables
for receivables2017 in soup.find_all('td')[39]:
    print(receivables2017.string)

receivables2017 = receivables2017.string

for receivables2016 in soup.find_all('td')[40]:
    print(receivables2016.string)

receivables2016 = receivables2016.string



aapl = {'Cash & Cash Equivalents':
            {'2017': cash_and_equivalents2017,
             '2016': cash_and_equivalents2016},
        'Receivables':
            {'2017': receivables2017,
             '2016': receivables2016}
        {

print(aapl)