mysql_tableinfo
— Generate Database Metadata
368
In MySQL 5.0 and up, the
INFORMATION_SCHEMA
database contains the same kind of
information in the
SCHEMATA
,
TABLES
,
COLUMNS
, and
STATISTICS
tables. See
Chapter 19,
INFORMATION_SCHEMA
Tables
.
Invoke
mysql_tableinfo
like this:
shell>
mysql_tableinfo [options] db_name [db_like [tbl_like]]
The
db_name
argument indicates which database
mysql_tableinfo
should use as the location for
the metadata tables. The database will be created if it does not exist. The tables will be named
db
,
tbl
(or
tbl_status
),
col
, and
idx
.
If the
db_like
or
tbl_like
arguments 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 info
mysql_tableinfo info world
mysql_tableinfo info mydb tmp%
Each of the commands stores information into tables in the
info
database. The first stores information
for all databases and tables. The second stores information for all tables in the
world
database. The
third stores information for tables in the
mydb
database that have names matching the pattern
tmp%
.
mysql_tableinfo
supports the following options:
Table 4.13.
mysql_tableinfo
Options
Format
Option File
Description
--clear [368]
clear [368]
Before populating each metadata table, drop it if it exists
--clear-only [369]
clear-only [369]
Similar to --clear, but exits after dropping the metadata
tables to be populated.
--col [369]
col [369]
Generate column metadata into the col table
--help [368]
Display help message and exit
--
host=host_name [369]
host [369]
Connect to the MySQL server on the given host
--idx [369]
idx [369]
Generate index metadata into the idx table
--
password=password [369]
password [369]
The password to use when connecting to the server -- not
optional
--
port=port_num [369]
port [369]
The TCP/IP port number to use for the connection
--
prefix=prefix_str [369]
prefix [369]
Add prefix_str at the beginning of each metadata table
name
--quiet [369]
quiet [369]
Be silent except for errors
--
socket=path [369]
socket [369]
Display version information and exit
--tbl-status [369]
tbl-status [369]
Use SHOW TABLE STATUS instead of SHOW TABLES
--
user=user_name, [369]
user [369]
The mysql_tableinfo user name to use when connecting
to the server
•
--help
[368]
Display a help message and exit.
•
--clear
[368]
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...