This is an original planning guide. It is not a vendor manual, an official standard, or legal advice. Example addresses use documentation ranges. Review every command before you paste it.
A connection string is a host, a database, and a secret that is not in git
A connection string tells a client where the database is and how to prove it may enter. The generators on this site draft the shape. They do not open a connection. You replace the host, the database, and the secret before anyone uses the draft.
The lab host is localhost. The database name is the lab name. The password is prompt-for-this in any note, and the real value comes from the store or from a prompt. A string committed to a repository is a string you treat as public, which means it cannot hold a secret.
Encryption on the wire is a choice you write down. A lab on your own machine may be local sockets. A client on another machine needs the protection your engine actually offers, turned on on purpose. Do not copy a disable-encryption flag from a forum into a shared client.
A pool has a size you can explain. More connections are not more speed when the database is already out of workers. The number goes in the ticket with the reason. The security guide owns the account. This page owns the string and the pool.
One lab string, one successful select, one secret kept out
Draft the string for localhost and the lab database. Put the password in the client prompt or the store, not in the file. Connect. Run the one-row select from the SQL guide. The prompt shows the lab database.
Search the ticket and the repo for the password and for prompt-for-this left as if it were real. Neither the password nor a live secret remains. A sample string in the ticket uses a fake password word only if you clearly mark it as fake, and prompt-for-this is the better mark.
If a second machine must connect, that is a firewall and a listen-address change in their own guides. You do not widen the listener in this window to finish the string.
Write the pool size the application will use. If you do not know, write unknown and stop before you invent 500.
A change you can finish
The application receives the lab proof, then a production string through the store, in a later change. Pasting the production string into a chat is not the change.
Rollback is the previous string in the store. You can point the application back without editing a committed file, because the secret was never committed.
- Draft the string for localhost and the lab database.
- Remove any password from the draft.
- Connect and run one small select.
- Confirm the prompt names the lab.
- Keep encryption decisions explicit.
- Write the pool size or write unknown.
- Do not commit a secret.
Mistakes that outlive the command
database connections fails in the same few ways. Each one looks finished on the day you type it. The list is here so the ticket can forbid them before the window, not so you can recognise them in an incident review.
- A password in git or in the ticket.
- A production host in the lab draft.
- Disabling encryption to get a client to connect, then leaving it disabled.
- A pool of hundreds with no reason.
- Opening the listener to every address.
- Sharing one superuser string with every service.
- A URI copied from a screenshot that included a secret.
- prompt-for-this left as the actual password.
- Two environments in one file with the wrong one active.
- No check that the select hit the lab.
Decisions to write down before the window
One decision for database connections: The host in the lab string is localhost. The database name is the lab. The secret is in the store or a prompt. A select succeeded. The repo was checked for secrets. Encryption is on, or the path is a local socket you named. The pool size is a number or an explicit unknown. The account is the one from the security guide, not a superuser. Listen-address changes are out of this window. Rollback is the previous stored string. One application is this window. And the string in the ticket cannot be used by a stranger.
The hour you stop
Write the database name, the host, and the clock time before you change anything for database connections. If this database is serving people and you do not have a copy, this hour is a plan. A plan you can read tomorrow is a success. A change you cannot undo is not.
Use a lab or a restored copy. The rows you read are rows you are allowed to hold. You do not point a client at a database, a cluster, or an account you do not administer. The tools on this site run in the browser. They do not log in, and they do not scan.
prompt-for-this is a reminder that a secret is missing. It is not a password, a token, or a key you save. The real secret stays in the password store. If a connection string, a log, or a ticket still contains a live secret, stop and rotate it. Then delete the copy.
One change. A config line, an index, a grant, and a restore do not share a window. If two things move and the outcome is wrong, you will not know which one did it. The rollback is the previous file or the backup you already tested.
A second person reads the scope aloud: which host, which database, which account. If they cannot find it in the ticket, the ticket is not ready. Silence is not agreement.
The lab listens on localhost. 127.0.0.1 is the address you bind until a firewall story exists. example.com is not your host. A generated file that listens on every address is a file you edit before it runs.
Do not run a statement you cannot undo. A delete or a drop without a backup and a where-clause you have read is the mistake this page is here to prevent. Read the statement. Count the rows it will touch. Then decide.
Keep the previous config and the previous dump. A generator draft is not the previous file. The previous file is what you put back if the new one is wrong. You practised the reload with a second session open when the change can lock you out.
If a step fails twice, stop. The failure is the result. Adding a command from a forum beside a half-applied config produces a database nobody can explain. Rebuild the lab from the copy you kept.
When the checks pass, the next database waits until someone else can repeat the proof from the notes. database connections is done for this window when the proof is written, not when the client printed a prompt.
This page is a planning guide. It is not a vendor manual, not an official standard, and not legal advice. If an auditor must see the decision, they see the ticket and the evidence, not this paragraph.
Hand the finished note to the neighbouring guide that owns the next step, and leave this database alone until that guide has its own window.
Connection checks before an application stores the string
Confirm this before you call the change done: The lab select returned. The prompt shows the lab database. No password is in the ticket. No password is in the repository. localhost is the lab host. Encryption or a local socket is stated. The pool size is written. The account is not a superuser. A second person read the host and the database name. The listener was not widened. prompt-for-this was not saved as a password. Production credentials were not used for the lab proof. The hostname in the prompt matches the hostname in the ticket for database connections. The result line includes the time and the person, not only the command. You can point at the rollback value without searching a chat history. And done is a sentence a second person can repeat: the proof for database connections happened, and the next host is not started early. If one of those fails, stop.
Tools for this guide
These tools run in the browser on this site. They do not log into your machines.
Related pillar guides
Guides in this cluster
These supporting pages belong to this pillar.
- Explainer: Connection Strings Explained
- Explainer: Oracle tnsnames.ora Explained
- Explainer: Database SSL/TLS Connection Modes Explained
- Reference: Database Default Ports
- Cheat Sheet: psql Cheat Sheet
- Cheat Sheet: MySQL Command-Line Cheat Sheet
- Cheat Sheet: sqlcmd Cheat Sheet
- Cheat Sheet: SQL*Plus Cheat Sheet
- Cheat Sheet: mongosh Cheat Sheet
- Cheat Sheet: redis-cli Cheat Sheet
- Cheat Sheet: sqlite3 and cqlsh Cheat Sheet