Introduction to the use of the MySQL SHOW command
- 2020-05-10 23:02:44
- OfStack
SHOW TABLES or SHOW TABLES FROM DATABASE;
Explanation: displays the names of all the tables in the current database
SHOW DATABASES;
Explanation: displays the names of all databases in MYSQL
SHOW PROCESSLIST;
Explanation: displays all processes running on the system, that is, the currently executing query. Most users can see their own processes, but if they have PROCESS rights, they can see everyone's processes, including passwords
SHOW TABLE STATUS;
Explanation: displays information about each table in DATABASE that is currently in use or specified. The information includes the table type and the latest update time of the table
SHOW COLUMNS FROM TABLE FROM DATABASE; Or SHOW COLUMNS FROM DATABASE;
Explanation: displays the column names in the table
SHOW GRANTS FOR USER@LOCALHOST;
Explanation: displays the permissions of one user. Displays the result similar to the GRANT command
SHOW INDEX FROM TABLE;
Explanation: displays the index of the table
SHOW STATUS;
Explanation: displays information about some system-specific resources, such as the number of threads running
SHOW VARIABLES;
Explanation: displays the names and values of system variables
SHOW PRIVILEGES;
Explanation: displays the different permissions supported by the server
SHOW CREATE DATABASE DATABASE;
Explanation: shows whether the CREATE DATABASE statement can create the specified database
SHOW CREATE TABLE TABLE;
Explanation: shows whether the CREATE DATABASE statement can create the specified database
SHOW ENGIES;
Explanation: displays the storage engine and the default engine available after installation.
SHOW INNODB STATUS;
Explanation: displays the status of the INNODB storage engine
SHOW LOGS;
Explanation: displays the logs of the BDB storage engine
SHOW WARNINGS;
Explanation: displays errors, warnings, and notifications generated by the last statement executed
SHOW ERRORS;
Explanation: only the error generated by the last execution statement is displayed
Explanation: displays the names of all the tables in the current database
SHOW DATABASES;
Explanation: displays the names of all databases in MYSQL
SHOW PROCESSLIST;
Explanation: displays all processes running on the system, that is, the currently executing query. Most users can see their own processes, but if they have PROCESS rights, they can see everyone's processes, including passwords
SHOW TABLE STATUS;
Explanation: displays information about each table in DATABASE that is currently in use or specified. The information includes the table type and the latest update time of the table
SHOW COLUMNS FROM TABLE FROM DATABASE; Or SHOW COLUMNS FROM DATABASE;
Explanation: displays the column names in the table
SHOW GRANTS FOR USER@LOCALHOST;
Explanation: displays the permissions of one user. Displays the result similar to the GRANT command
SHOW INDEX FROM TABLE;
Explanation: displays the index of the table
SHOW STATUS;
Explanation: displays information about some system-specific resources, such as the number of threads running
SHOW VARIABLES;
Explanation: displays the names and values of system variables
SHOW PRIVILEGES;
Explanation: displays the different permissions supported by the server
SHOW CREATE DATABASE DATABASE;
Explanation: shows whether the CREATE DATABASE statement can create the specified database
SHOW CREATE TABLE TABLE;
Explanation: shows whether the CREATE DATABASE statement can create the specified database
SHOW ENGIES;
Explanation: displays the storage engine and the default engine available after installation.
SHOW INNODB STATUS;
Explanation: displays the status of the INNODB storage engine
SHOW LOGS;
Explanation: displays the logs of the BDB storage engine
SHOW WARNINGS;
Explanation: displays errors, warnings, and notifications generated by the last statement executed
SHOW ERRORS;
Explanation: only the error generated by the last execution statement is displayed