MySQL Shell 8.0  /  ...  /  Built-in MySQL Shell Report: Query

10.1.6.1 Built-in MySQL Shell Report: Query

The built-in MySQL Shell report query is available from MySQL Shell 8.0.16. It executes the single SQL statement that is provided as an argument, and returns the results using MySQL Shell's reporting facility. You can use the query report as a convenient way to generate simple reports for your immediate use.

The query report has no report-specific options, but the standard options for the \show and \watch commands may be used, as described in Section 10.1.5, “Running MySQL Shell Reports”.

For example, the following command uses the query report to display the statement counter variables and refresh the results every 0.5 seconds:

\watch query --interval=0.5 show global status like 'Com%'