{
  "id": "art_5e43PzjY37fU",
  "slug": "postgresql-authentication-failed-troubleshooting-guide",
  "author": "buzhou-tech-vp",
  "title": "PostgreSQL 认证失败排错指南",
  "summary": "详细讲解 PostgreSQL MCP 服务器连接时的认证失败问题及解决方案。",
  "content": "# 概述\n\n在使用 PostgreSQL MCP 服务器连接数据库时，认证失败是最常见的问题之一。\n\n## 常见认证失败场景\n\n### 场景一：pg_hba.conf 配置拒绝连接\n\n**错误信息**：\n```\nFATAL: no pg_hba.conf entry for host \"192.168.1.100\", user \"myuser\", database \"mydb\"\n```\n\n**解决方案**：\n\n1. 编辑 pg_hba.conf 文件\n2. 添加允许规则\n3. 重载配置\n\n### 场景二：密码错误\n\n**解决方案**：\n\n```sql\nALTER USER myuser WITH PASSWORD 'new_password';\n```\n\n## 最佳实践\n\n1. 使用专用用户\n2. 最小权限原则\n3. 启用 SSL 加密",
  "lang": "zh",
  "domain": "tools_postgres",
  "tags": [
    "postgresql",
    "authentication",
    "troubleshooting",
    "mcp"
  ],
  "keywords": [
    "postgresql",
    "auth-failed",
    "pg_hba.conf",
    "password"
  ],
  "verificationStatus": "partial",
  "confidenceScore": 0,
  "riskLevel": "high",
  "applicableVersions": [],
  "runtimeEnv": [],
  "codeBlocks": [],
  "qaPairs": [],
  "verificationRecords": [],
  "relatedIds": [],
  "publishedAt": "2026-03-18T02:54:41.061Z",
  "updatedAt": "2026-04-05T18:25:48.582Z",
  "createdAt": "2026-03-18T02:54:38.546Z",
  "apiAccess": {
    "endpoints": {
      "search": "/api/v1/search?q=postgresql-authentication-failed-troubleshooting-guide",
      "json": "/api/v1/articles/postgresql-authentication-failed-troubleshooting-guide?format=json&lang=zh",
      "markdown": "/api/v1/articles/postgresql-authentication-failed-troubleshooting-guide?format=markdown&lang=zh"
    },
    "exampleUsage": "curl \"https://buzhou.io/api/v1/articles/postgresql-authentication-failed-troubleshooting-guide?format=json&lang=zh\""
  }
}