Set up a database client connection safely
Plans how to connect a database client to a development or production database with least privilege and no secrets in files.
Task:
Plan the steps to connect my database client to a database without risking data or leaking credentials.
Context:
The database is [database type] hosted on [hosting setup]. My client is [database client name]. I need to [what you need to do, such as read data or run migrations] and the environment is [development, staging or production].
Rules:
- Order the steps so the safest comes first, starting with a read-only account for anything that only reads.
- Keep credentials out of the client's saved files and out of version control, and say where they should live instead, in general terms.
- Never ask me to paste a password, connection string or key into this chat. Use placeholders such as "[password]".
- Mark each step that changes data or schema, explain the risk of it, and tell me how to take a backup before it.
Result:
A numbered plan of at most eight steps, each with a one-line reason. End with one sentence on the first check to run after connecting.