mysqldoc

mysqldoc is a command-line utility to auto-document MySQL Schema.
Download

mysqldoc Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL
  • Price:
  • FREE
  • Publisher Name:
  • Ryan Lowe
  • Publisher web site:
  • http://code.google.com/p/mysqldoc/

mysqldoc Tags


mysqldoc Description

mysqldoc is a command-line utility to auto-document MySQL Schema. mysqldoc is a command-line utility to auto-document MySQL Schema. Output formats include XML, HTML, and TXT. mysqldoc takes COMMENT arguments and translates them into useful formats.Instead of the typical table creation statement likeCREATE TABLE `user` ( `id` int(10) unsigned NOT NULL auto_increment, `email` varchar(32) NOT NULL, `pw_hash` char(40) NOT NULL COLLATE latin1_general_cs, `date_created` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`id`));mysqldoc encourages embedding documentation within the schema itself:CREATE TABLE `user` ( `id` int(10) unsigned NOT NULL auto_increment COMMENT 'System-Generated Primary Key', `email` varchar(32) NOT NULL COMMENT 'Email address (used for login) of the user', `pw_hash` char(40) NOT NULL COLLATE latin1_general_cs COMMENT 'SHA-1 hash of the password', `date_created` timestamp NOT NULL default CURRENT_TIMESTAMP COMMENT 'System-Generated timestamp of record creation', PRIMARY KEY (`id`), UNIQUE (`email`)) COMMENT 'Holds user-specific information for login';Sample Usage:shell> ./mysqldoc --helpUsage: mysqldoc Options: --databases=database] Database(s) to use. Comma-Separated, if more than one. --help Display this help and exit. --host=< hostname > Connect to host. --html-links Include HTML hyperlinks (only in HTML output) to relevant MySQL documentation. --no-html-links Do not include links to MySQL documentation. --output= The format in which to generate the output. --password Password to use when connecting to server. If password is not given, it is asked from the tty. --port=# Port number to use for connection. --print-defaults Print the program argument list and exit. --show-engines Show the storage engine for each table. --no-show-engines Do not show the storage engine for each table. --show-indexes Show the indexes on each table. --no-show-indexes Do not show the indexes on each table. --show-size Show storage size (for tables, indexes, and databases). --no-show-size Do not show storage size. --show-triggers Show TRIGGERS associated with each table. --no-show-triggers Do not show TRIGGERS associated with each table. --show-trigger-body Show TRIGGER bodies (implies --show-triggers). --no-show-trigger-body Do not show TRIGGER bodies. --show-udf Show User-Defined Functions. --no-show-udf Do not show User-Defined Functions. --show-udf-body Show UDF bodies (implies --show-udf). --no-show-udf-body Do not show UDF bodies. --socket Socket file to use for connection. --ssl Enable SSL for connection (automatically enabled with other flags). --ssl-ca=name CA file in PEM format (check OpenSSL docs, implies --ssl). --ssl-capath=name CA directory (check OpenSSL docs, implies --ssl). --ssl-cert=name X509 cert in PEM format (implies --ssl). --ssl-cipher=name SSL cipher to use (implies --ssl). --ssl-key=name X509 key in PEM format (implies --ssl). --tables=< table >] Enumerated list of tables for the script to be run against. Each table must be specified with both database and table names, e.g. database_name.table_name. --ignore-tables=< table >] Enumerated list of tables to be skipped (all unnamed tables will be included). Each table must be specified with both database and table names, e.g. database_name.table_name. --user=< username > Username to use when connecting to server. --version Output version information and exit. defaults are: ATTRIBUTE VALUE -------------------------- ------------------ databases ALL (excluding `mysql` and `information_schema`) help FALSE host localhost html-links TRUE show-indexes FALSE output TXT password (No default value) port 3306 print-defaults FALSE show-engines TRUE show-size TRUE (MB) show-triggers FALSE show-trigger-body FALSE show-udf FALSE show-udf-body FALSE socket (No default value) ssl FALSE ssl-ca (No default value) ssl-capath (No default value) ssl-cert (No default value) ssl-cipher (No default value) ssl-key (No default value) tables (No default value) ignore-tables (No default value) user Current user version FALSERequirements:· DBI· DBD::mysql· Pod::Usage· Getopt::Long· Switch· PerlWhat's New in This Release:· Added support for connecting via ssl· If no databases are specified, mysqldoc will now generate docs for all databases on the specified instance (excluding mysql and information_schema databases)· Instead of defaulting the user to root, in defaults to the user running the script· Short command line options are now accepted· Began prepping the code base for 0.1.0


mysqldoc Related Software