Overview
This guide will walk you through:- Launching QueryBox for the first time
- Creating your first database connection
- Exploring database objects
- Executing your first query
- Understanding query results
This quickstart assumes you’ve already installed QueryBox. If not, complete the installation first.
Launch QueryBox
Start the application using your platform’s method:- Windows
- macOS
- Linux
Double-click
querybox.exe or run from Command Prompt:Create Your First Connection
Let’s create a connection using SQLite, which doesn’t require a separate database server.Open Connections Window
If the connections window isn’t visible:
- Click the Connections menu item, or
- Use the keyboard shortcut to open it
Select Database Type
From the database type dropdown, select SQLite.You’ll see two authentication options:
- Local File - For local SQLite database files
- Turso Cloud - For Turso cloud-hosted SQLite databases
Configure Connection
Fill in the connection details:Example:
A friendly name for your connection (e.g., “My Test Database”)
Path to your SQLite database file. You can:
- Browse to an existing
.dbor.sqlitefile - Enter a path to create a new database
- Use
:memory:for an in-memory database (lost when connection closes)
Test the Connection
Before saving, click Test Connection to verify the SQLite plugin can access the database.You should see a green checkmark with “Connection successful” message.
Save Connection
Click Save or Create Connection to store the connection.Your new connection appears in the connections list. QueryBox has:
- Stored connection metadata in its internal SQLite database
- Saved credentials securely using your OS keyring (or encrypted fallback)
- Emitted a
connection:createdevent to update the UI
Explore Database Objects
Now that you have a connection, let’s explore its structure using the connection tree.Open Connection Tree
In the main query window, you’ll see a sidebar with a tree view. Select your newly created connection from the dropdown at the top.The plugin will execute the
connection-tree command to fetch the database structure.Browse Database Objects
For SQLite, the tree shows:Click the arrows to expand and collapse sections.
If you used
:memory: or a new database file, the tree will be empty initially. We’ll create tables in the next section.Execute Your First Query
Let’s create a sample table and run some queries.Create a Table
In the query editor (main text area), enter:Click the Execute button or press
Expected result: “Query executed successfully” or similar message.
Ctrl+Enter (Windows/Linux) or Cmd+Enter (macOS).What happens behind the scenes
What happens behind the scenes
When you execute a query:
- QueryBox calls
PluginManager.ExecPlugin() - The SQLite plugin process is spawned
- Your query is sent via stdin as JSON:
- The plugin executes the query and returns results via stdout
- The plugin process exits
- Results are displayed in the results pane
Insert Sample Data
Add some test data:Execute the query. You should see “3 rows affected” or similar.
Query the Data
Now retrieve the data:Execute the query. The results pane displays a formatted table:
| id | name | created_at | |
|---|---|---|---|
| 3 | Carol White | carol@example.com | 2026-03-01 10:30:15 |
| 2 | Bob Jones | bob@example.com | 2026-03-01 10:30:15 |
| 1 | Alice Smith | alice@example.com | 2026-03-01 10:30:15 |
Congratulations! You’ve successfully created a connection, explored database objects, and executed queries.
Understanding Query Results
QueryBox displays results in different formats depending on the query type and database:- SQL Results
- Document Results
- Key-Value Results
SELECT queries return Displayed as an interactive table with:
SqlResult with columns and rows:- Column headers
- Sortable columns (click header to sort)
- Scrollable rows
- Copy to clipboard functionality
Try Other Database Types
Now that you understand the basics, try connecting to other databases:MySQL
Required info:
- Host (e.g.,
localhost:3306) - Database name
- Username and password
- Optional: TLS/SSL settings
PostgreSQL
Required info:
- Host (e.g.,
localhost:5432) - Database name
- Username and password
- Optional: SSL mode
Redis
Required info:
- Host and port (e.g.,
localhost:6379) - Password (if configured)
- Database number (0-15)
ArangoDB
Required info:
- URL (e.g.,
http://localhost:8529) - Database name
- Username and password
Advanced Features
EXPLAIN Queries
For databases that support it (MySQL, PostgreSQL, SQLite), use the Explain button to analyze query execution plans:Click Explain
Instead of Execute, click the Explain button.The plugin automatically adds
EXPLAIN to your query and shows the execution plan.The Explain button only appears for plugins that advertise the
explain-query capability in their metadata.Multiple Connections
QueryBox supports multiple concurrent connections:- Create connections to different databases (even different types)
- Switch between them using the connection dropdown
- Each connection maintains its own tree view and state
- Credentials are managed securely and independently
Plugin Management
View and manage installed plugins:View Plugin Information
Each plugin displays:
- Name and version
- Description and author
- Capabilities (connection-tree, test-connection, explain-query)
- License and documentation links
Best Practices
Connection Naming
Connection Naming
Use descriptive names that include:
- Environment (dev, staging, production)
- Database purpose
- Server location
- “Production MySQL - Users DB”
- “Dev PostgreSQL - Local”
- “Analytics Redis - Cache”
Credential Security
Credential Security
- QueryBox stores credentials in your OS keyring when available
- Never commit the QueryBox data directory to version control
- Use read-only credentials for production databases
- Test connections before saving to catch authentication issues early
Query Organization
Query Organization
- Save frequently used queries as snippets (feature coming soon)
- Use comments to document complex queries
- Test queries on development databases first
- Use transactions for multi-statement operations
Performance
Performance
- Use LIMIT clauses for large result sets
- Each query spawns a new plugin process (intentional isolation)
- Connection tree queries have 30s timeout
- Test connections have 15s timeout for faster feedback
Troubleshooting
Connection test fails
Connection test fails
Common causes:
- Incorrect host, port, or credentials
- Firewall blocking the connection
- Database server not running
- SSL/TLS configuration mismatch
- Verify credentials in a different client (e.g.,
mysqlCLI) - Check network connectivity:
ping <host>ortelnet <host> <port> - Review error message from the plugin
- Check database server logs
Query timeout
Query timeout
Symptoms: “context deadline exceeded” after 30 secondsSolutions:
- Optimize the query (add WHERE clauses, indexes)
- Use LIMIT to reduce result set size
- For long-running queries, increase timeout (feature coming soon)
- Consider running expensive queries directly on the database server
Connection tree empty
Connection tree empty
Possible reasons:
- New/empty database (expected)
- Plugin doesn’t implement
connection-treecommand - Insufficient permissions to query metadata tables
- Create some tables and refresh the tree
- Check if the plugin supports connection trees in Plugins window
- Verify database user has metadata query permissions
Plugin not found
Plugin not found
Symptoms: “Plugin not found” when creating connectionSolutions:
- Open Plugins window and verify plugin is listed
- Click Rescan to re-probe plugins
- Check that plugin executable exists in
bin/plugins/ - Verify file is executable (Linux/macOS:
chmod +x) - Rebuild plugins:
task build:plugins
Next Steps
Connection Management
Learn advanced connection features and credential management
Plugin System
Understand how plugins work and create your own database drivers
Query Workspace
Master the query editor and result viewing features
Security Model
Deep dive into QueryBox’s security architecture