Guide

How to share database credentials securely

A database connection string contains the host, user and password, which is everything an attacker needs. It is also what developers and vendors ask for most often, usually in a ticket or chat. Treat it like any other high-value secret: share it once, to one person, and rotate it afterwards.

Last updated: 2026-10-12

Before you share

  • Create a dedicated user with only the permissions the task needs.
  • Restrict the user to the required IP addresses or network if your database supports it.
  • Prefer short-lived credentials or a temporary user you can drop afterwards.

Hand it over

  1. Paste the connection string or password into a one-time link with a short expiry.
  2. Send the link to the one person who needs it, and the passphrase through a different channel.
  3. Ask them to store it in a secrets manager, not in code, tickets or documents.

After the work is done

  • Drop the temporary user or rotate the password.
  • Check the database logs for the access you expect and nothing else.
  • Never commit connection strings to a repository, even a private one.

Frequently asked questions

Is it safe to put a database password in a ticket?

No. Tickets are visible to many people and kept for years. Use a one-time link, then rotate the password.

How long should a shared database credential live?

As short as the task allows. Create a temporary user and drop it when the work is finished.

Share a secret now

Create a one-time, self-destructing link in seconds. No account needed.

Create a secret link

Related guides