Skip to content
All writing Part 01 of 09 · Reaching a Remote DB From Your Laptop
Engineering · 1 min read

A Database Connection Is Just Five Coordinates

Every database connection (Postgres, MySQL, Mongo) is the same five pieces: host, port, user, password, database. Learn the model, and every CLI flag maps to one of them.

Any database connection (Postgres, MySQL, Mongo, anything) is the same five pieces. Mental model: address + keys.

A connection

  ├─ address: host (which machine) + port (which door) + database (which DB)
  └─ keys:    user (who am I) + password (prove it)
#CoordinateAnswers
1hostwhich machine?
2portwhich door on it?
3userwho am I?
4passwordprove it
5databasewhich DB on that server?

There is no sixth thing. Every confusing CLI flag maps to exactly one of these. Learn the five, and every DB tool collapses into one model; only the spelling of the flags changes.

From this session: confusion over “-h -d -pwd -user or whatever” across psql / mysql / mongo dissolved once we named the fixed five-coordinate set behind all of them.

Every DB tool is the same five-coordinate model with a different spelling: memorize the model, not the flags.


References

Related: back to the remote DB overview, then on to the connection URI and the MySQL CLI flags.

Tags #databases #cli
// connect

Be brave | Be wise | Be grateful

21 BreakinCode

// elsewhere
LinkedInMedium (lang: en)Life RecordYoutube
wh:~$William Hung· © 2026 Taipei · GMT+8 · Available for collaboration