What it is
The MySQL command line client, mysql, is the terminal program that ships with MySQL for connecting to a database server and running SQL. You type a query and get rows back, or feed it a file of statements to run in one go. It is the most direct way to look at what is actually in a database.
It works the same against a local server or a remote one, and it can run in batch mode for scripts, with options for output format, character set and which database to use. Its companion mysqldump exports a database to SQL, which is the basis of many backup and copy routines.
How I use it
- MySQL at a prompt is part of how I run Rental Pilot: production and a scrubbed sandbox live on the same server but never share a database.
- The sandbox is refreshed from a production snapshot with customer emails scrubbed, so a test can never reach a real customer.
- The database is bound to the server itself, not exposed to the internet.
- An AI agent answers data questions against the production database and returns findings instead of dumping rows.
- Records are soft-deleted and changes are audited, so nothing is hard-deleted.
A database prompt is the right tool when the question is what is really in the data, not what a screen shows. I reach for it because money either reconciles or it does not, and the fastest way to find out is to ask the database directly. Production changes still go through the application, so the audit trail stays intact.
Questions
How do you test against real data without risking customers?
Rental Pilot's sandbox is a separate database refreshed from a production snapshot, with customer email addresses scrubbed and outgoing mail queued for approval. It shares the server with production but never the database.
Do you edit production data by hand?
Routine changes go through the application so they are audited. I use the prompt for diagnosis and for planned, reviewed repairs.