Handy Database Tool: Documentation
Everything you need to install, set up and use Handy Database Tool. If anything here isn't clear, ask us – we'd rather improve the page than leave you guessing.
Requirements
| Joomla | 6.0 or later (tested on 6.2); Joomla 5 is not supported |
|---|---|
| PHP | 8.3 or later |
| Database | Joomla's connection: MySQL 8.0.13+ / MariaDB 10.4+ or PostgreSQL 12+; Joomla's MySQLi and MySQL (PDO) drivers |
| Browser | a current Chrome, Edge, Firefox or Safari (desktop; tablets and phones work as well) |
The installation changes no Joomla core file and no configuration.php, and needs no changes to the components you monitor.
Installation
- Buy Handy Database Tool in our shop. The order e-mail has your licence key and a link to My downloads, where you download
pkg_handydbtool-1.1.1.zip. - System → Install → Extensions: upload the package.
The package installs the component Handy Database Tool and the plugin System – Handy Database Tool, enables the plugin and creates the history table. No module is needed: the floating icon is added by the plugin.
Right after the installation
- Super Users see the floating database icon on every administrator page and, after logging in on the website, on every website page. Monitoring is on for all components.
- Everybody else sees nothing until you grant permissions.
- The tool is read-only: record editing, record deletion, write SQL and structural SQL are switched off and granted to nobody but Super Users.
First steps
- Components → Handy Database Tool → Options: in Monitoring switch Monitor All Components off and choose the components you are working on (or keep all); in Floating Icon choose its position; switch on editing, deleting, write or structural SQL only if you need them.
- Permissions tab: give your developers' group what it needs (recommended set-ups). The floating icon needs at least View SQL Monitor and View Captured Queries; the administrator page Components → Handy Database Tool also needs Access Administration Interface.
- Open any page of a monitored component, click the icon in the top right corner and then a query.
The floating monitor
A small round blue button with a database symbol, on every website and administrator page while you are logged in with View SQL Monitor and monitoring is on (not in modal windows, never for visitors). A badge shows the number of SQL queries the monitored components ran for the current page; the icon turns orange after a slow query and red after a failed one. Point at it for a summary such as “12 queries captured on this page (140 in total). 1 slow.”
A click opens Recent SQL queries: filters (SQL contains…, component, query type, status, This page only), a summary line, and one row per query with a coloured type badge, the component, tables, time and the start of the SQL, plus Copy SQL and View full query. A click on a row opens the SQL Inspector on that query; the footer has Open SQL Inspector and, for administrators, Options.
Using the SQL Inspector
A large window over the current page (the whole screen on phones); Esc closes it and the page underneath stays as it was. In the administrator the same inspector is shown on the page Components → Handy Database Tool, with a bar that tells which components are monitored.
| Query Details | Filter bar across the top; captured queries on the left; the selected query formatted and highlighted with component, source extension, time, rows, status, application, page, tables (links to the Table Browser) and bound parameters; Copy SQL, Open in SQL Editor. |
|---|---|
| SQL Editor | Run SQL, Format SQL, Clear, Copy SQL, Load selected query, Export CSV. A line tells which statement kinds you may run. Results per statement: status, time, rows or affected rows, a paginated grid (NULL shown as a grey label, empty strings as ""), or the database error. Destructive statements open a red confirmation first. |
| Database Tables | Search, origin filter (Joomla core, third-party, other), records (≈ = estimate), engine, size, owning extension; Browse and Query Builder per table. |
| Table Browser | Collapsible table information (columns, indexes, relationships with links); search in all text columns, filters per column (equals, contains, starts / ends with, greater, less, NULL, empty …), sort, page sizes; view, edit and delete per record; Export CSV or Export selected. The record editor shows a Review changes table (original and new values) before saving; if someone else changed the record meanwhile, nothing is overwritten. |
| Query Builder | Table, template (numbered 1–40 in six groups; unavailable ones are greyed out with the reason), the inputs of the template, Preview SQL, Run Query, Open in SQL Editor, Export CSV. |
| Query History | Filters (SQL, component, source, status, dates), Export CSV, Clear history; per entry Re-run, Load into SQL Editor, Copy SQL. |
Records can only be edited or deleted when the table has a primary key or a unique index without NULL columns; key and binary columns cannot be changed.
Options
Components → Handy Database Tool → Options. A function is available only when both the option is on and the user has the permission.
| Tab | Option | Default |
|---|---|---|
| Monitoring | Enable Monitoring | Yes |
| Monitor All Components | Yes | |
| Components to Monitor | – | |
| Capture Unattributed Queries | No | |
| Maximum Queries Retained | 200 per user | |
| Highlight Slow Queries | Yes | |
| Slow Query Threshold | 100 ms | |
| Capture Failed Queries | Yes | |
| Capture Execution Times | Yes | |
| Floating Icon | Show Floating Icon | Yes |
| Horizontal Position | Right | |
| Vertical Position | Top | |
| Display Query Count | Yes | |
| Display Error Indicator | Yes | |
| Database Browser | Default Page Size | 25 |
| Maximum Records per Page | 100 | |
| Enable Record Editing | No | |
| Enable Record Deletion | No | |
| Enable Bulk Deletion | No | |
| Enable CSV Export | Yes | |
| Maximum Rows per Export | 50000 | |
| SQL Editor | Enable Read-Only SQL | Yes |
| Enable Write SQL | No | |
| Enable Structural SQL | No | |
| Allow Multiple Statements (Super Users only can change it) | No | |
| Confirm Destructive Operations | Yes | |
| History | Enable Query History | Yes |
| Store Monitored Queries | Yes | |
| Store Bound Parameters (may contain personal data) | No | |
| Retention Period | 30 days | |
| Maximum History Entries | 5000 |
Read-only SQL means SELECT, SHOW, DESCRIBE, EXPLAIN, WITH … SELECT, VALUES, TABLE; write SQL INSERT, UPDATE, DELETE, REPLACE, MERGE; structural SQL CREATE, ALTER, DROP, TRUNCATE, RENAME and table maintenance.
Permissions
| Permission | Allows | Also needs |
|---|---|---|
| Access Administration Interface | the page Components → Handy Database Tool | – |
| Manage Extension Configuration | the Options | – |
| View SQL Monitor | monitoring of the user's page requests, the floating icon | Enable Monitoring |
| View Captured Queries | the popup list, Query Details, Clear Queries | – |
| View Database Tables | Database Tables, table information, structure templates | – |
| View Table Data | records in the Table Browser, data templates, CSV of table data | View Database Tables |
| Execute Read-Only SQL | read statements in the SQL Editor, CSV of results | Enable Read-Only SQL |
| Execute Write SQL | write statements | Enable Write SQL |
| Execute Structural SQL | structural statements | Enable Structural SQL |
| Edit Table Records | the record editor | View Table Data, Enable Record Editing |
| Delete Table Records | deleting single records | View Table Data, Enable Record Deletion |
| Bulk Delete Table Records | deleting several selected records | Delete Table Records, Enable Bulk Deletion |
| View Query History | the Query History, its CSV and Clear history | Enable Query History |
Recommended set-ups
Developer, read-only (typical)
View SQL Monitor, View Captured Queries, View Database Tables, View Table Data, Execute Read-Only SQL, View Query History.
Lead developer
Additionally Edit Table Records, Delete Table Records, Execute Write SQL — and switch on the matching options.
Support staff for one component
View SQL Monitor and View Captured Queries; Monitor All Components off and the component selected.
Production sites
Keep the defaults, grant permissions to as few people as possible, keep Store Bound Parameters off, and consider disabling the system plugin while the tool is not needed.
Keyboard
| Key | Where | Action |
|---|---|---|
| Esc | popup, inspector, dialogs | close |
| ← → Home End | inspector tabs | change tab |
| Ctrl+Enter (⌘+Enter) | SQL Editor | run |
| Tab | SQL Editor | indent |
| Enter | search and filter fields | apply |
Your licence key and updates
Your licence key (it starts with HDT1.) gives you one-click updates for the twelve months included with your licence:
- Components → Handy Database Tool → Options → License: paste the key and save.
- The status shows Update license (green) with licensee, number, domains and Updates until — or License key not accepted (incomplete, key of another product, not for this domain, or ended).
Saving also writes the key into the Download Key of the update site, so System → Update → Extensions installs new versions while your twelve months of updates run; afterwards everything keeps working. Keys work for their domains and subdomains; development hosts (localhost, *.test, *.local …) always. The key is verified offline.
Updating and uninstalling
Updating: use Joomla's update manager, or install a new package from My downloads over the existing one. Options, permissions and the query history are kept; installing an older version over a newer one is refused.
Uninstalling: System → Manage → Extensions, select the package Handy Database Tool, Uninstall. This removes the component, the plugin, the history table, the captured query buffers and the metadata cache; your own tables and data stay as they are.
administrator/components/com_handydbtool | component |
components/com_handydbtool | website entry point of the tool's JSON API (no public pages) |
media/com_handydbtool | script and style of the monitor and the inspector |
plugins/system/handydbtool | system plugin |
cache/handydbtool | per-user query buffers and metadata cache (Joomla's Clear Cache may delete it at any time) |