Introduction
Maatkit command line options are in the process of being standardized. Discussion is ongoing at http://groups.google.com/group/maatkit-discuss/browse_thread/thread/94df786e79d983fd and issue 318 .
Until final decisions are made, this wiki will track the current proposal for standard Maatkit command line options.
Please provide any feedback at the link given above.
Current Proposal
Following are the currently proposed standard Maatkit options. Not all tools will have all of these options, but if a tool does have one or more of them, then its meaning is standard according to these lists:
mysql cli-like options:
| Option | Short Form | Meaning |
| --defaults-file | -F | Defaults file to read for MySQL options |
| --host | -h | Connect to MySQL host |
| --password | -p | Password for MySQL connection |
| --port | -P | Connect to MySQL port |
| --socket | -S | Connect to MySQL socket |
| --user | -u | User for MySQL connection |
additional options for tools that connect to MySQL servers
| Option | Short Form | Meaning |
| --ask-pass | | Prompt for password for MySQL connection |
| --charset | -A | Set character set |
| --database | -D | Database to use for the MySQL connection |
| --set-vars | | Set these MySQL variables after connecting |
| --where | | WHERE clause to limit operations to certain rows |
database/table/column/engine filter options:
| Option | Short Form | Meaning |
| --databases | -d | List of allowed databases |
| --tables | -t | List of allowed tables |
| --columns | -c | List of allowed columns |
| --engines | -e | List of allowed engines |
| --ignore-databases | | List of databases to ignore |
| --ignore-tables | | List of tables to ignore |
| --ignore-columns | | List of columns to ignore |
| --ignore-engines | | List of engines to ignore |
miscellaneous options:
| Option | Short Form | Meaning |
| --config | | Read this comma-separated list of config files ( issue 231 ) |
| --daemonize | | Fork, detached from screen, and continue running in background |
| --dry-run | | Explain what work would be done, but don't do anything |
| --help | | Show help and exit |
| --log | | Send ALL output to this file when daemonized |
| --pid | | PID file when daemonized |
| --print | | Print results after doing the work to generate them |
| --progress | | Show progress report |
| --quiet | -q | Do not print anything |
| --sentinel | | Exit if this file exists |
| --stop | | Create the --sentinel file and exit (TODO: verify this behavior) |
| --run-time | | Amount of time to run before exiting (replaces --time) |
| --threads | | Number of concurrent threads to run for parallel tasks |
| --verbose | -v | Print more info |
| --version | | Show version and exit |
| --wait | -w | Wait this amount of time for some condition to become true |
Conventions
Command-line options should follow these conventions:
- If the tool connects to MySQL server(s) at all, it should accept --user, --password, --ask-pass, etc.
- If the tool uses DSNs to specify server connections, it should have some default-handling behavior, e.g. the same way mk-table-checksum does it (default to values from preceding DSNs, and then to --user, etc).
- The trunk/maatkit/standardize-options script should not complain about the tool.
Updated Tools
The tools are being updated one-by-one because implementing the standardized options in a tool is not a quick task. Here is the list of tools that have and have not been updated:
Tools marked "NA" are skeleton tools, or not in development, etc.