Run read-only MySQL queries
DevOpsPad sends every MySQL query inside a transaction opened as READ ONLY, then rolls it back when the result has been read. MySQL rejects data-changing statements such as INSERT, UPDATE and DELETE inside that transaction, so an accidental write from the editor fails on the server instead of changing rows.
The read-only transaction is a safety net, not a permission system. MySQL ends the current transaction implicitly before most DDL statements, such as CREATE, ALTER and DROP, so the only reliable protection is a MySQL account that has no write privileges. Use both.
Run a query
- Select a MySQL connection in the Explorer and choose a database from the selector.
- Click a table, or click New query for an empty tab.
- Type a statement and press ⌘ / Ctrl + Enter or click Run query.

The tab toolbar shows Read-only session. Results appear below the editor, with up to 500 rows per query and 50 rows per result page.
SELECT status, COUNT(*) AS orders
FROM orders
WHERE created_at >= NOW() - INTERVAL 1 DAY
GROUP BY status
ORDER BY orders DESC;
What works
SELECTqueries, including joins, subqueries and aggregates.SHOWstatements such asSHOW DATABASES,SHOW TABLES,SHOW PROCESSLISTandSHOW CREATE TABLE.EXPLAINfor aSELECT.
What fails
INSERT,UPDATE,DELETEandREPLACE: MySQL returns an error because the transaction is read-only.- More than one statement in a single run.
- Anything your MySQL account is not allowed to do.
DDL is the exception described above. DevOpsPad does not parse or block DDL itself, so a user with DROP privileges could still drop a table. Create a dedicated account instead:
CREATE USER 'devopspad_ro'@'%' IDENTIFIED BY '<password>';
GRANT SELECT, SHOW VIEW ON app.* TO 'devopspad_ro'@'%';
Least-privilege accounts covers this for every engine.
Results and precision
DevOpsPad keeps values exact on their way to the result grid. Large integers such as 9007199254740993 are passed as text, so they do not lose digits the way JavaScript numbers would. Dates are shown in RFC 3339 format in UTC. NULL is shown as a distinct NULL marker, not as an empty string.
Limits
- 500 rows. If more rows exist, the footer says the result limit was reached. Add
LIMIT,WHEREor aggregation. - 8 MiB. A preview stops when the encoded result reaches 8 MiB and says why. Select fewer or narrower columns.
- 20 seconds. Every request has a 20-second outer timeout. Cancelling stops the client request, but the server may keep running the statement until its own timeout. See run and cancel queries.
The full list is in result limits.
Frequently asked questions
Can DevOpsPad change data in MySQL?
Not through the query editor. Each statement runs inside a read-only transaction that the server rolls back, so INSERT, UPDATE and DELETE are rejected by MySQL itself.
Can I run several statements at once?
No. Run one statement per execution. Split scripts into separate runs.