...
You can query the database for additional usage data using the UI or at a command line, as described below. The reference to the MySQL database is stored in htdocs/application/data/sql/database_structure.sql.
Generating SQL reports using the UI
...
Running a SQL query from a command line
To run a SQL query from a command line:
...
If needed, it's possible to execute custom SQL statements from the command line. To do so use the procedure described on the Running a custom SQL script page.