This is a module for monitoring the MySQL SQL database server using the SHOW SQL command.
This module is persistent, which means that the history of any of the displayed data cells can be reliably recorded and later processed.

On UNIX type platforms, it requires the mysqltcl package (at http://www.xdobry.de/mysqltcl/) for connection via the native MySQL protocol, or the tclodbc package (at http://tclodbc.sourceforge.net/) for connection via ODBC (Open DataBase Connectivity).
On Windows platforms, please read the install.txt file.

Data is drawn from the SHOW STATUS or SHOW VARIABLES queries result and displayed in 1 table with the variables data column (sorted in alphabetical order), the raw values column, the values as number column where values only appear if valid numbers (so they can be dropped in data viewers that can only handle numerical values), and the rate (per second) values column which is displayed only when monitoring the server status:

Error handling:

When an error occurs (communicating with the database server or any other type), all numeric cells are set to void (displayed as ?), while the remaining cells become empty. A descriptive error message is also generated in such a case.
It is also possible, if there are too many rows displayed, that a unique internal row number could not be assigned to each data row, in which case an error message is displayed, and the --like option should be used to limit the number of lines.

Module options:

- --dsn
  ODBC Data Source Name (see your database/system administrator if in doubt). In this case, the tclodbc package is used for connecting to the database. This option is incompatible with the --host or --p (--port) options.
- --host
  host name or IP address where the database server is running (defaults to localhost).
- --like
  using the SQL LIKE clause to retrieve the data from the server, limit the display to those variables that match the pattern parameter (see the MySQL manual for more information and examples below).
- -p (--port)
  port used by the database server. 3306 is used internally if not specified.
- --user
  database user name (defaults to current user).
- --password
  database password for user (no default).
- --status
  display server status information using the SQL SHOW STATUS query to retrieve the data from the server (must be used if --variables is not).
- --variables
  display values of MySQL system variables using the SQL SHOW VARIABLES query to retrieve the data from the server (must be used if --status is not).

Examples:

    $ moodss myshow --variables --host 1.2.3.4
    $ moodss myshow --status --host dbserver.company.com --port 3307 --like Com_show_%status%
    $ moodss myshow --status --host dbserver.company.com --user status --password xxx
    $ moodss myshow --status --dsn mydb --user status --password xxx

Threads support:

If you use Tcl/Tk 8.4.1 or above with the Tcl Threads package 2.5 or above, then the module will use threads for the database connection. This means that the core (moodss user interface for example) cannot be hung (moodss menus not responding, window not being updated, ...) when the connection with the database is failing.
You can check that moodss actually is in threads mode by looking at the bottom line of the module help window, while moodss is running: a status line will indicate whether threads are in use.