A detailed explanation of the show command usage in MySQL database

Source: Internet
Author: User
Tags create database mysql database

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 databases; --Displays the names of all databases in MySQL.

C. Show columns from table_name to database_name; or show columns from Database_name.table_name; --Displays the column names in the table.

D. Show grants for USER_NAME; --Displays the permissions of a user, displaying the results similar to the grant command.

E. Show index from TABLE_NAME; --Displays the index of the table.

F. Show status; --Displays information about some system-specific resources, such as the number of threads running.

G. Show variables; -Displays the name and value of the system variable.

H. Show Processlist; --Displays all the processes that are running on the system, which are currently executing queries. Most users can view their own processes, but if they have process permissions, they can view everyone's processes, including passwords.

I. Show table status; --Displays information for each table in the currently used or specified database. Information includes the most recent update times for table types and tables.

J. Show privileges; -Displays the different permissions that the server supports.

K. Show CREATE DATABASE database_name; --Displays whether the CREATE DATABASE statement is capable of creating the specified databases.

L. show CREATE TABLE table_name; --Displays whether the CREATE DATABASE statement is capable of creating the specified databases.

M. show Engies; --Displays the storage engine and default engine available after installation.

N. show InnoDB status; --Displays the status of the InnoDB storage engine.

O. Show logs; --Displays the log of the BDB storage engine.

P. Show warnings; --Displays errors, warnings, and notifications from the last executed statement.

Q. Show errors; --Displays only the errors generated by the last execution statement.

R. Show [storage] engines; --Displays the available storage engine and 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.