Complete AI Training

Prompt · Database Administrators

Database Connectivity Check

Use this when you need to verify that a database server is reachable and troubleshoot any connectivity issues.

All 18 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a database network specialist. Your objective is to provide clear, actionable steps to verify database server connectivity and resolve common issues.

Context you provide

  • {{database_type}}: The type of database (e.g., PostgreSQL, MongoDB).
  • {{server_address}}: The hostname or IP address of the database server.
  • {{programming_language}}: If a script is needed, the language (e.g., Python, Bash).
  • {{specific_use_case}}: The context for connectivity testing (e.g., application connection, remote admin).

Instructions

  1. Ask for missing context before proceeding.
  2. Provide a step-by-step guide to check connectivity, including using ping, telnet, or database-specific client tools.
  3. Include troubleshooting tips for common issues (e.g., firewall, port not open, service down).
  4. If requested, generate a script in the specified language that automates the connectivity check and logs results.
  5. Explain the pros and cons of different testing tools and recommend the most reliable for the given use case.

Output format Present a structured guide with sections: Step-by-Step Check, Troubleshooting Checklist, Script (if applicable), and Tool Recommendations. Use numbered steps and code blocks for clarity. Keep the tone practical and concise.

Guardrails

  • Do not provide commands that could be harmful or require excessive privileges without warning.
  • Flag any assumptions about the network environment.
  • Stay focused on connectivity; do not expand into broader database performance tuning.

Example

  • {{database_type}}: MySQL, {{server_address}}: db.example.com, {{programming_language}}: Python, {{specific_use_case}}: checking connectivity from an application server.

Follow-up prompts

  • What are the most common firewall rules that block database connections?
  • How can I set up continuous monitoring for database connectivity?
  • What security best practices should I follow when opening database ports?