MySQL's show statement Daquan

Source: Internet
Author: User

The common MySQL show statements are listed below:

1.show databases; Displays the names of all databases in MySQL
2.show tables [from database_name]; Displays the names of all tables in the current database
3.show columns from table_name; Show column names in table, same as DESC tablename
4.show [FULL] processlist;//all process information that is running
5.show grants for USER_NAME; Displays the permissions of a user, displaying results similar to the grant command
6.show [GLOABL | session] variables [like '%keyword% ']; Display the name and value of a system variable
7.show [GLOABL | session] status [like '%keyword% ']; //Provides server state information. With the global option, you can get status values for all MySQL connections. Using the session, you can get all the status values for the current connection. The default is session.
8.show index from Tb_name [from db_name]; Index of the display table
9.show privileges; Display the permissions supported by the server
10.show table status [from db_name] [like '%keyword% ']; Displays information about each table in the current database or in the specified databases, including the table type, creation time, and the last updated time of the table.
11.show CREATE DATABASE database_name; Display the CREATE DATABASE statement
12.show CREATE TABLE Tab_name; Display the CREATE TABLE statement
13.show InnoDB status; Displays the status of the InnoDB storage engine
14.show logs; Displaying logs for the BDB storage engine
15.show warnings; Displays errors, warnings, and notifications resulting from the last statement executed
16.show errors; Displays the error resulting from the last execution of the statement
17.sHow character set [like '%pattern% '];//Used to display the available character sets, like to match the CharSet field of a table
18.show collation [like ' latin1% ']; //To show how all available character sets are sorted, like to match the collation field in a table.
19.show full columns from tab_name [like '%user% '];//Displays the information for each column in a given table, the full keyword causes the output to contain the permissions you have, and contains the comments for each column, like to match the column names.
20.Show Engine InnoDB logs;//Display log or status information for the storage engine
Show[storage] engines;// displays status information for the storage engine. You can see if a storage engine is supported, and what the default engine is.
Show grants;
Show grants for username;
Show grants for Current_User;
Show grants for Current_User ();

23.show open tables [from dbname] [like '%keyword% '];// lists the non-temporary tables that are currently open in the table cache.
24.show triggers [from db_name] [like '%keyword% '];// lists the triggers currently defined by the MySQL server. The expression (expr) to be matched by the LIKE clause is compared to the name of the table in which the trigger was defined, not to the name of the triggering program.
25.show CREATE PROCEDURE sp_name;//Show details about a stored procedure

MySQL's show statement Daquan

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.