SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from Other MySQL-client-community-5.0.96-1.sles10.x86_64.rpm

\FBMYSQL_TABLEINFO\F

Section: MySQL Database System (1)
Updated: 03/02/2012
Index 

NAME

mysql_tableinfo - generate database metadata 

SYNOPSIS

mysql_tableinfo [options] db_name [db_like [tbl_like]]
 

DESCRIPTION

mysql_tableinfo

creates tables and populates them with database metadata. It usesSHOW DATABASES,SHOW TABLES,SHOW TABLE STATUS,SHOW COLUMNS, andSHOW INDEXto obtain the metadata.

In MySQL 5.0 and up, theINFORMATION_SCHEMAdatabase contains the same kind of information in theSCHEMATA,TABLES,COLUMNS, andSTATISTICStables. SeeChapter 18, INFORMATION_SCHEMA Tables.

Invokemysql_tableinfolike this:

shell> mysql_tableinfo [options] db_name [db_like [tbl_like]]

Thedb_nameargument indicates which databasemysql_tableinfoshould use as the location for the metadata tables. The database will be created if it does not exist. The tables will be nameddb,tbl(ortbl_status),col, andidx.

If thedb_likeortbl_likearguments are given, they are used as patterns and metadata is generated only for databases or tables that match the patterns. These arguments default to%if not given.

Examples:

mysql_tableinfo infomysql_tableinfo info worldmysql_tableinfo info mydb tmp%

Each of the commands stores information into tables in theinfodatabase. The first stores information for all databases and tables. The second stores information for all tables in theworlddatabase. The third stores information for tables in themydbdatabase that have names matching the patterntmp%.

mysql_tableinfosupports the following options:

*--help

Display a help message and exit.

*--clear

Before populating each metadata table, drop it if it exists.

*--clear-only

Similar to--clear, but exits after dropping the metadata tables to be populated.

*--col

Generate column metadata into thecoltable.

*--host=host_name,-h host_name

Connect to the MySQL server on the given host.

*--idx

Generate index metadata into theidxtable.

*--password=password,-ppassword

The password to use when connecting to the server. Note that the password value is not optional for this option, unlike for other MySQL programs. You can use an option file to avoid giving the password on the command line.

Specifying a password on the command line should be considered insecure. SeeSection 5.3.2.2, lqEnd-User Guidelines for Password Securityrq.

*--port=port_num,-P port_num

The TCP/IP port number to use for the connection.

*--prefix=prefix_str

Addprefix_strat the beginning of each metadata table name.

*--quiet,-q

Be silent except for errors.

*--socket=path,-S path

The Unix socket file to use for the connection.

*--tbl-status

UseSHOW TABLE STATUSinstead ofSHOW TABLES. This provides more complete information, but is slower.

*--user=user_name,-u user_name

The MySQL user name to use when connecting to the server.

 

COPYRIGHT


Copyright © 1997, 2012, Oracle and/or its affiliates. All rights reserved.

This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.

 

SEE ALSO

For more information, please refer to the MySQL Reference Manual,which may already be installed locally and which is also availableonline at http://dev.mysql.com/doc/. 

AUTHOR

Oracle Corporation (http://dev.mysql.com/).


 

Index

NAME
SYNOPSIS
DESCRIPTION
COPYRIGHT
SEE ALSO
AUTHOR

This document was created byman2html,using the manual pages.