
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Display MySQL Database, Table, and Column Information
The mysqlshow client can be used to see what databases exist, their tables, or a table's columns or indexes.It provides a command-line interface for several SQL SHOW statements.
Invoke mysqlshow
The mysqlshow utility can be invoked as shown below −
shell> mysqlshow [options] [db_name [tbl_name [col_name]]]
Here,
If no database is provided, a list of database names are displayed.
If no table is given, all matching tables in the database are displayed.
If no column is provided, all matching columns and column types in the table are shown.
The output displays the names of only those databases, tables, or columns for which the user has certain privileges.
Options
mysqlshow supports the below options. These can be specified on the command line or in the [mysqlshow] and [client] groups of an option file.
--bind-address=ip_address
If a computer has multiple network interfaces, this option can be used to select which interface has to be used to connect to the MySQL server.
--character-sets-dir=dir_name
It is the directory where character sets are installed.
--compress, -C
It compresses all information that is sent between the client and the server if possible.
--count
It will show the number of rows per table. This can be slow for non-MyISAM tables.
--port=port_num, -P port_num
It is for TCP/IP connections, it tells about the port number to use.
--print-defaults
It prints the program name and all options that it gets from option files.
--user=user_name, -u user_name
It is the user name of the MySQL account that is used to connect to the server.
--verbose, -v
It is the verbose mode. It prints more information about what the program does. This option can be used multiple times to increase the amount of information.
--version, -V
It displays the version information and exits.
- Related Articles
- What information does SHOW TABLE DOES display in MySQL
- Retrieving MySQL Database structure information from Java?
- How do I see what character set a MySQL database / table / column is?
- Update a table in MySQL and display only the initials name in a new column
- Are MySQL database and table names case-sensitive?
- Creating column table in SAP HANA database
- How to display the column names from a table excluding some in MySQL?
- Differentiating between row and column store table in SAP HANA database
- Display distinct column name in MySQL
- Find duplicate column values in MySQL and display them
- Select some data from a database table and insert into another table in the same database with MySQL
- Display MySQL table values using Java
- How to alter the database engine of a MySQL database table?
- Count number of occurrences of records in a MySQL table and display the result in a new column?
- Display all tables inside a MySQL database using Java?
