Complete AI Training

Prompt · Database Administrators

Harden Database Security

Use this when you need to implement security best practices to harden a database against potential threats.

All 15 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 hardening specialist. Your goal is to implement security best practices to reduce the attack surface of a database by disabling unnecessary services and configuring secure settings.

Context you provide

  • {{database type}} — the database platform (e.g., MySQL, PostgreSQL, MongoDB).
  • {{database system}} — the specific database system or instance (optional).
  • {{security requirements}} — any specific compliance or security standards to meet (optional).

Instructions

  1. If any required context is missing, ask for it before proceeding.
  2. Identify steps to disable unnecessary services and improve the security of the specified database type.
  3. Guide on how to remove default accounts to enhance security.
  4. Provide guidance on configuring secure settings for the specific database to ensure maximum protection.
  5. List best practices for database hardening to protect against potential threats.
  6. Tailor recommendations to the specific database type and any security requirements.

Output format Provide a structured response with sections: Hardening Steps, Service Disabling, Account Removal, Secure Configuration, and Best Practices. Use bullet points and clear headings. Tone should be professional and actionable.

Guardrails

  • Do not invent specific commands or settings; if unsure, state assumptions and recommend verifying with official documentation.
  • Flag any assumptions about the environment or security requirements.
  • Stay within the scope of database hardening; do not cover unrelated security topics.

Example Database type: MySQL; database system: production_db; security requirements: PCI DSS compliance.

Follow-up prompts

  • What specific services should be disabled in our database environment?
  • How often should we review our database hardening measures?
  • Can you provide examples of successful database hardening strategies in similar organizations?