Name
SHOW
Syntax
SHOW [FULL] COLUMNS FROMtable
[FROMdatabase
] [LIKEclause
] SHOW DATABASES [LIKEclause
] SHOW FIELDS FROMtable
[FROMdatabase
] [LIKEclause
] SHOW GRANTS FORuser
SHOW INDEX FROMtable
[FROMdatabase
] SHOW KEYS FROMtable
[FROMdatabase
] SHOW LOGS SHOW MASTER STATUS SHOW MASTER LOGS SHOW [FULL] PROCESSLIST SHOW SLAVE STATUS SHOW STATUS [LIKEclause
] SHOW TABLE STATUS [FROMdatabase
[LIKEclause
]] SHOW [OPEN] TABLES [FROMdatabase
] [LIKEclause
] SHOW VARIABLES [LIKEclause
]
Description
Displays a lot of different information about the MySQL system. This statement can be used to examine the status or structure of almost any part of MySQL.
Examples
# Show the available databases SHOW DATABASES # Display information on the indexes on table 'bigdata' SHOW KEYS FROM bigdata # Display information on the indexes on table 'bigdata' # in the database 'mydata' SHOW INDEX FROM bigdata FROM mydata # Show the tables available from the database 'mydata' that begin with the # letter 'z' SHOW TABLES FROM mydata LIKE 'z%' # Display information about the columns on the table 'skates' SHOW COLUMNS FROM stakes # Display information about the columns on the table 'people' # that end with '_name' SHOW FIELDS FROM people LIKE '%\_name' # Show server status information. SHOW STATUS # Display server variables SHOW VARIABLES
Get Managing & Using MySQL, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.