Get the App
SLTechnology News&Howtos  ›  Servers  › 

The usage of the Linux basic command mysqlshow

Shulou Source: shulou.com Published: 2022-06-01 12:36:37 10月01日 Update

This article mainly explains "the usage of the Linux basic command mysqlshow". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the usage of the Linux basic command mysqlshow".

Mysqlshow

Mysqlshow is a client-side program that can display database information, table information, and field information.

The scope of application of this command: RedHat, RHEL, Ubuntu, CentOS, Fedora.

1. Grammar

Mysqlshow [options] [db_name [tbl_name [col_name]

2. List of option parameters

Option

Description

-? |-- help

Display help information

-- bind-address=ip

Bind ip

-- character-sets-dir

Default character set directory

-I |-- status

Display additional information for the table

-count

Displays the number of rows in the table

-C |-- compress

Use compressed statements between the server and the client

-P |-- port

Designated port

-- protocol

Specified protocol

-v |-- verbose

Show detailed procedures

-V |-- version

Display version information

-u |-- user

Designated user

-p |-- password

Specify password

3. Examples

1) check which databases are available

[root@localhost ~] # mysqlshow-u root-p / / shows which databases are available

Enter password:

+-+

| | Databases |

+-+

| | information_schema |

| | david |

| | discuz |

| | drupal |

| | mediawiki |

| | mysql |

| | phpmyvisites |

| | test |

| | test01 |

| | test02 |

| | wordpress |

+-+

2) check which tables are in the database

[root@localhost ~] # mysqlshow-u root-p test / / displays the information of database test

Enter password:

Database: test

+-+

| | Tables |

+-+

| | wj |

+-+

3) check what fields are in the table

[root@localhost ~] # mysqlshow-u root-p test wj / / displays information about table wj in database test

Enter password:

Database: test Table: wj

+-+

| | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |

+-+

| | id | int (11) | | NO | select,insert,update,references | | |

| | name | text | latin1_swedish_ci | NO | select,insert,update,references | | |

+-+

Thank you for your reading, the above is the content of "the usage of the Linux basic command mysqlshow". After the study of this article, I believe you have a deeper understanding of the usage of the Linux basic command mysqlshow, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Information data database commands basics learning content fields customers between parameters characters character sets instances clients passwords that is ideas situations articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS vpn Redmi Huawei Shulou Information