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

The usage of the Linux basic command mysqlshow

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

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!

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

Servers

Wechat

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

12
Report