Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to the usage of mysqlshow command

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The mysqlshow command included with MySQL allows us to view some parameters, databases, tables, columns, indexes and other information of MySQL without connecting to the MySQL client. The usage is as follows:

Check what libraries are available: mysqlshow-uroot-p

Check what tables are available in a wyzc: mysqlshow-uroot-p wyzc

Note: add the-v parameter to show how many columns there are in each table: mysqlshow-uroot-p-v wyzc

Add two-v parameters to show how many rows there are in each table: mysqlshow-uroot-p-v-v wyzc

Add the table name (City) after the wyzc to view the details of a table: mysqlshow-uroot-p wyzc City

Note: add the-I parameter to view all the details of the table

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

Add the-k parameter to view the index and column information of the table: mysqlshow-uroot-p-k wyzc City

View only the index information of a table: mysqlshow-uroot-p-k wyzc City invalid_col_name

So mysqlshow just looks at this basic information, and how can we apply it to our work? take a look at the following example, the following script implements a separate backup of a single library of MySQL:

Each library is backed up separately:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report