Introduction to the use of the Mysqlshow command

Source: Internet
Author: User
Tags mysql client one table

MySQL's own mysqlshow command allows us to view MySQL's parameters, databases, tables, columns, indexes and other information without connecting to the MySQL client, using the following methods:

See which libraries are available: Mysqlshow-uroot-p

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ f6b2463779b1470ba9e8595a98f38060/version/152?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 152?method= get-resource&sharetoken=28866 "/>

See what tables are in a library (WYZC): Mysqlshow-uroot-p wyzc

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ 1d2260da3b0a47d192dad7972d2e73f1/version/153?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 153?method= get-resource&sharetoken=28866 "/>

Note: When you add the-v parameter, you can show how many columns each table has: mysqlshow-uroot-p-v Wyzc

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ befa9084e6a045318053c15603c6f077/version/154?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 154?method= get-resource&sharetoken=28866 "/>

Add 2-v parameters to show how many rows each table has: Mysqlshow-uroot-p-v-v wyzc

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ 61c486d25aa54597a00d07a08bc6ce3b/version/155?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 155?method= get-resource&sharetoken=28866 "/>

You can view the details of a table by adding the table name (city) after the library name (WYZC): Mysqlshow-uroot-p wyzc City

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ 883a3d5deb924f2bbfff00eda8d765dd/version/156?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 156?method= get-resource&sharetoken=28866 "/>

Note: With the-i parameter, you can view all the details of the table

View information for one column of a table: mysqlshow-uroot-p wyzc City ID

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ b4340126bdaa438b8efa796173d5ba8e/version/157?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 157?method= get-resource&sharetoken=28866 "/>

Plus the-K parameter to view the table's Index and column information: mysqlshow-uroot-p-K WYZC City

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ 9f303d051436445e96b151fb66ae11ad/version/158?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 158?method= get-resource&sharetoken=28866 "/>

View only one table index information: mysqlshow-uroot-p-K wyzc City Invalid_col_name

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ 127b7c94fa5e486a9bff82b9ecbe8f2a/version/159?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 159?method= get-resource&sharetoken=28866 "/>

So mysqlshow just look at the basic information, how do we apply to the work, see the following example, the following script implements a single library that backs up MySQL separately:

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ 00abda75277945858ff450b74a2a803c/version/160?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 160?method= get-resource&sharetoken=28866 "/>

Each library is backed up separately:

650) this.width=650; "Src=" http://note.youdao.com/yws/api/group/11158000/noteresource/ fd594f9404f446c896e6f23261119261/version/161?method=get-resource&sharetoken= 28866fb739554139b3a4df559aadcfb2&entryid=97470659 "style=" height:auto;border:0px; "alt=" 161?method= get-resource&sharetoken=28866 "/>


For more exciting MySQL content please follow me:

650) this.width=650; "Src=" http://qr.liantu.com/api.php?bg=ffffff&fg=000000&gc=000000&el=L&text= http%3a%2f%2fwap.wyzc.com%2freg%2f%3ftg%3d3006123630 "alt=" Api.php?bg=ffffff&fg=000000&gc=000000&el "/>

Introduction to the use of the Mysqlshow command

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.