MySQL Show Command Summary

Source: Internet
Author: User

There are a lot of basic commands in MySQL, and the show command is one of them, and it's easy to confuse the use of SHOW commands among many users, and this article brings together the many uses of the show command.
A. Show tables or show tables from database_name; -Displays the names of all tables in the current database.
B. Show tables like ' my_% '; -Displays the table in the current database that starts with My_.
c. show databases; -Displays the names of all databases in MySQL.
D. Show [full] columns from table_name to database_name; or show [full] columns from database_name.table_name; -Displays the column names in the table.
E. Show grants for USER_NAME; -Displays a user's permissions and displays results similar to the grant command.
F. Show index from TABLE_NAME; -Displays the index of the table.
G. Show status (show Master status;show slave status)-Displays information about some system-specific resources, such as the number of threads that are running.
H. Show variables; -Displays the name and value of the system variable.
I. Show [full] processlist; -Displays all the processes that are running in the system, that is, the query that is currently executing. Most users can view their own processes, but if they have process permissions, they can see all processes, including passwords.
J. Show Table status; -Displays information about each table in the database that is currently being used or specified. Information includes the table type and the last updated time of the table.
K. Show privileges; -Displays the different permissions supported by the server.
L. Show CREATE DATABASE database_name; -Displays whether the CREATE DATABASE statement is able to create the specified databases.
M. Show CREATE TABLE table_name; -Displays whether the CREATE DATABASE statement is able to create the specified databases.
N. show Engies; -Displays the storage engine and the default engine that are available after installation.
O. Show InnoDB status; -Displays the status of the InnoDB storage engine.
P. show logs; -Displays the logs for the BDB storage engine.
Q. Show warnings; -Displays errors, warnings, and notifications resulting from the last statement executed.
R. Show errors; -Displays only errors resulting from the last execution statement.
S. Show [storage] engines; – Displays the available storage engines and the default engine after installation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.