What dbvr is, and why use it with MySQL
dbvr lets you define MySQL connections and run SQL from the command line, with no graphical interface. That makes it a fit for servers, containers, and pipelines where a desktop database tool cannot run.
DBeaver Corporation announced dbvr on March 26, 2026 as a standalone CLI built on the same multi-database engine as the DBeaver desktop products. According to that announcement, it can:
- Run SQL queries and scripts from saved or inline connection settings, with no interactive login.
- Run on locked-down servers, inside containers, and over SSH on remote hosts.
- Authenticate natively to AWS, GCP, and Azure databases.
- Export query results to S3, Google Cloud, or Azure storage.
- Plug into CI/CD pipelines for database checks and backup/restore validation.
There are two editions. The commercial edition is an annual per-machine subscription with a 14-day trial. dbvr Community is free under the Apache License 2.0. Per the dbeaver.io product summary, Community covers MySQL, username and password authentication, SSH tunnels, local result export, and metadata management. Cloud storage export, cloud authentication, external secret managers, and the MCP server are listed for the commercial edition only.
This post covers creating a MySQL datasource, running queries, and using dbvr for production queries. Full documentation is available.
Creating a MySQL datasource
In dbvr, a datasource is a saved, named connection, so later commands can refer to it by name instead of repeating host and credentials. You create one with the datasource create command and a MySQL driver. In the following example we are using 26.10.0 MySQL Community Server – GPL.
The full option list is in the datasource create reference.
$ dbvr datasource create –driver=mysql8 –name=world –host=localhost –port=3306 –user=stoker –password=hidave –database=world
mysql8-1a1f537d8af-5a9a876cc3457ae9
$ dbvr datasource list
ID NAME DRIVER mysql8-1a1f537d8af-5a9a876cc3457ae9 world mysql8
Running queries
The sql command runs a query or a whole script against a datasource and prints or exports the results. Per the sql reference and cheat sheet, you can:
- Pass a query inline, pointing at a saved datasource by name.
- Run a
.sqlscript file instead of an inline query. - Skip the saved datasource and give connection details inline, useful for one-off checks.
- Write results to a file in a chosen format such as CSV.
The meta commands list databases, schemas, and tables and print their DDL, so you can inspect a MySQL server without a GUI. In MySQL, a schema and a database are the same thing, so expect the database and schema listings to overlap.
$ dbvr sql -ds=world "SELECT * FROM city LIMIT 5;"
|ID |Name |CountryCode|District |Population|
|—|————–|———–|————-|———-|
|1 |Kabul |AFG |Kabol |1,780,000 |
|2 |Qandahar |AFG |Qandahar |237,500 |
|3 |Herat |AFG |Herat |186,800 |
|4 |Mazar-e-Sharif|AFG |Balkh |127,800 |
|5 |Amsterdam |NLD |Noord-Holland|731,200 |
Rows read: 5, (153ms)
Using dbvr for production queries
Because dbvr needs no GUI or interactive login, it can run production MySQL queries wherever your automation already runs: a scheduled job on a server, a container, or a CI/CD pipeline step.
Common production uses, based on DBeaver’s announcement and docs:
- Scheduled reports. A cron job or scheduler runs a saved
.sqlscript against the production datasource and exports the results to CSV. - Exports to cloud storage. The
sqlcommand can read scripts from and write results to S3, Google Cloud, or Azure storage URIs (commercial edition). - Pipeline checks. A deployment step runs validation queries, such as row counts or schema checks, and fails the build if they return unexpected results.
- Backup and restore validation. Verification scripts run against a restored database to confirm schema integrity and data completeness.
- AI tool access. dbvr can run as an MCP server (
mcp start, commercial edition) so an AI assistant can query a datasource. For production, point it only at a read-only datasource.
To keep this safe:
- Keep Prod in its own project. Separate projects make it harder to run a test script against production by mistake.
- Keep passwords off the command line. A password typed as a command option can end up in shell history and process lists. dbvr has
secret-managercommands and a pre-configure credentials guide; check those for the method that fits your setup. - Use a read-only MySQL account. Grant it only SELECT on the databases reports need. This protects data regardless of how dbvr is configured.
- Cap runaway queries. MySQL’s
max_execution_timesetting (in milliseconds) stops long-running SELECT statements. It applies to read-only SELECTs, not writes, and is set globally or per session rather than per account. - Version-control your scripts. Run reviewed
.sqlfiles from a repository rather than ad-hoc inline queries.
dbvr vs. the mysql client
Neither tool wins everywhere. The mysql command-line client is the more mature choice for MySQL-only work, while dbvr pays off when you need multiple databases, cloud logins, or cloud exports. The dbvr column reflects DBeaver’s own published claims, not independent testing.
|
dbvr |
mysql client |
|
|---|---|---|
|
Databases |
100+ SQL and NoSQL engines |
MySQL (and largely MariaDB) only |
|
Cost |
Annual per-machine subscription; free Community edition (Apache 2.0) |
Free; ships with MySQL |
|
Cloud authentication |
Native AWS, GCP, and Azure (commercial edition) |
Usually needs a token from the cloud provider’s CLI |
|
Exporting results |
Writes directly to S3, Google Cloud, or Azure storage (commercial edition) |
Writes local output; upload separately |
|
Saved connections |
Named datasources grouped in projects, plus |
Option files ( |
|
AI tool access |
Built-in MCP server (commercial edition) |
None built in |
|
MySQL-specific features |
Not verified to match the mysql client |
|
|
Maturity |
Launched March 2026 |
Decades of production use |
Pick the mysql client for MySQL-only work on servers you control. Pick dbvr when you work across several database engines, use cloud-managed databases with IAM-style login, or export straight to cloud storage. Oracle’s MySQL Shell (mysqlsh) is a third option worth evaluating if you also want scripting in JavaScript or Python.
Wrapping up
dbvr brings DBeaver’s MySQL connectivity to the command line: create a datasource once, then run and export queries from scripts, servers, and pipelines. Pair it with separate projects, stored credentials, and a read-only MySQL account, and it becomes a dependable way to run production queries.
Sources
Planet for the MySQL Community