尝试连接到我的数据库时出现 ConnectionRefusedError
async def create_db_pool():
db = await asyncpg.create_pool(database="hyena", user="postgresql", password="mypwd")
print("Connect to database")
asyncio.run(create_db_pool())
我已将用户 postgres 更改为 postgresql
这是完整的错误:
ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 5432)
提前致谢!