In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Mysqlshow: a database object viewing tool that is used to quickly find out which databases, tables, columns, or indexes exist in the database.
Option:-- count displays statistics for databases and tables
-k displays the indexes in the specified table
-I display the status information of the table
Show all databases without any parameters
[root@www mysql-5.6.30] # mysqlshow
+-+
| | Databases |
+-+
| | information_schema |
| | mysql |
| | performance_schema |
| | test |
+-+
Do not specify a database and display statistics for databases and tables
[root@www mysql-5.6.30] # mysqlshow-- count
+-+
| | Databases | Tables | Total Rows | |
+-+
| | information_schema | 59 | 13157 | |
| | mysql | 28 | 2474 | |
| | performance_schema | 52 | 16615 | |
| | test | 2 | 24 | |
+-+
4 rows in set.
Specify a database to display statistics
[root@www mysql-5.6.30] # mysqlshow-uroot test-count
Database: test
+-+
| | Tables | Columns | Total Rows | |
+-+
| | backt118 | 4 | 12 | |
| | t118 | 4 | 12 | |
+-+
2 rows in set.
Specify databases and tables to display statistics
[root@www mysql-5.6.30] # mysqlshow-uroot test t118-count
Database: test Table: t118 Rows: 12
+-+
| | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-+
| | name | char (10) | utf8_general_ci | YES | MUL | select,insert,update,references | | |
| | age | int (3) | | YES | select,insert,update,references | | |
| | chushen | date | | YES | select,insert,update,references | | |
| | shengao | int (3) | | YES | select,insert,update,references | | |
+-+
Displays all the indexes of the specified table. The first part is the structure of the table, and the second part is the index information of the table.
[root@www mysql-5.6.30] # mysqlshow-uroot test t118-k
Database: test Table: t118
+-+
| | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-+
| | name | char (10) | utf8_general_ci | YES | MUL | select,insert,update,references | | |
| | age | int (3) | | YES | select,insert,update,references | | |
| | chushen | date | | YES | select,insert,update,references | | |
| | shengao | int (3) | | YES | select,insert,update,references | | |
+-+
+ -+
| | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+ -+
| | t118 | 1 | index_name | 1 | name | A | 12 | YES | BTREE |
| | t118 | 1 | index_ccc | 1 | name | A | 12 | YES | BTREE |
+ -+
Display the status information of the table
[root@www mysql-5.6.30] # mysqlshow-I-uroot test t118
Database: test Wildcard: t118
+- -- +
| | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | |
+- -- +
| | t118 | InnoDB | 10 | Compact | 12 | 1365 | 16384 | 0 | 0 | | 2017-04-29 22:33:47 | utf8_general_ci |
+- -- +
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.