Mike Schilli's Friendly Neighborhood Perl Shop

Home
USArundbrief.com
Resume
CPAN Modules
Articles in English
Articles in German
Mike's Script Archive
English-Japanese Translation Trainer
Adventures with O'Reilly's Safari
10 Easy Steps to Become a California Driver
Unofficial perlmonks.com IRC Channel
My Collection of Outage Pages
Prisma (Computer Club Deutschland)
Mike's Monologues
Mike's Script Archive: mysql-schema

mysql-schema - Show a MySQL database schema in ASCII boxes


NAME

    mysql-schema - Show a MySQL database schema in ASCII boxes


DOWNLOAD

mysql-schema


SYNOPSIS

    mysql-schema [-u user] [-p password] database


DESCRIPTION

mysql-schema prints a MySQL database schema, just as if someone was using the mysql client and typed ``show tables'' and ``describe xyz'' for every table in the given database.

It uses the MySQL client mysql to query the database, so make sure that's installed and in your PATH.

Also make sure that your mysql client prompts like

    mysql>

after every command because that's what mysql-schema is looking for. If you have a setting like pager=less in your my.cnf file this won't work for obvious reasons, so make sure it's not the case.


EXAMPLES

  $ mysql-schema mydb
  $ mysql-schema -u root mydb
  $ mysql-schema -u myself -p 123 mydb


THANKS

Thanks to Alexander De Bernardi for sending in fixes for bugs with mysql- schema's -u and -p options.


LEGALESE

Copyright 2006 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.


AUTHOR

2006, Mike Schilli <mschilli@perlmeister.com>


Latest update: 20-Oct-2013