{
  "id": "python/django-db-connection-error",
  "signature": "django.db.utils.OperationalError: (2002, \"Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)\")",
  "signature_zh": "Django数据库操作错误：(2002, \"无法通过套接字'/var/run/mysqld/mysqld.sock'连接到本地MySQL服务器（2）\")",
  "regex": "django\\.db\\.utils\\.OperationalError:\\ \\(2002,\\ \"Can't\\ connect\\ to\\ local\\ MySQL\\ server\\ through\\ socket\\ '/var/run/mysqld/mysqld\\.sock'\\ \\(2\\)\"\\)",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "MySQL server is not running or socket path is incorrect.",
  "root_cause_type": "generic",
  "root_cause_zh": "MySQL服务器未运行或套接字路径不正确。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "May still fail if MySQL is not running.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Doesn't fix the database server issue.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Start MySQL service: sudo systemctl start mysql",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-12-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}