MySQL's show statement Daquan

Source: Internet
Author: User

MySQL's show statement Daquan

http://blog.163.com/yang_jianli/blog/static/16199000620106223253773/

MySQL's show statement Daquan

2010-07-02 14:32:53|   Category:  mysql  |   Tags: show    Statements   mysql  | report | font size   subscription

Based on my use of MySQL, the commonly used MySQL show statements are listed as follows:

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 the 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];//display table index
9.show privileges;//display server-supported permissions  
10.show table status [From Db_name] [like '%keyword% ']; Displays information for the current database or for each table 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 CREATE DATABASE statement
12.show CREATE table tab_name;//Display CREATE TABL e  Statement
13.show innodb status;//display InnoDB Storage engine State  
14.show logs;// Displays the log of the BDB storage engine
15.show warnings;//displays errors, warnings, and notifications resulting from the last executed statement  
16.show Errors Displays the error generated by the last execution statement  
17.s How 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.
.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

You are welcome to add ...

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.