Name
mysql_tableinfo
Synopsis
mysql_tableinfooptionsnew_database[existing_database[existing_table]]
This utility creates a table containing information about existing tables in a database. You have to specify the database that will contain the newly created metadata tables, and the utility will create the database if it does not exist. If given the name of an existing database, it will use its metadata as its basis. If also given a table name, it will refer to its metadata.
The utility will create four tables in the database:
db, col, idx,
and tbl. This last table may be named
tbl_status instead. It uses the SHOW
COLUMNS, SHOW DATABASES, SHOW
INDEXES, SHOW TABLES, and SHOW
TABLE STATUS statements to get metadata information. The user
given must have the necessary privileges for these statements.
mysql_tableinfo options
--clearThis option drops all four tables to be created by the utility if they exist, before creating new ones and populating them.
--clear-onlyThis option drops all four tables to be created by the utility if they exist, but doesn’t create new ones—the utility will exit when it’s finished deleting the tables.
--colThis option puts column metadata into the
coltable.--help,-?,-IThis option displays help information about the utility.
--host=,host-hhostThis option specifies the host on which to obtain metadata information and to create tables.
--idxThis option puts index metadata into the
idxtable.--password=,password-ppasswordThis option provides the password of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access