Find us on Google+ Google+

October 29, 2018

MySQL mysqlshow utility commands

mysqlshow utility commands

mysqlshow   ==> Shows the structure of a MySQL database (databases, tables, and columns). for end users to see information on tables and columns. replacement for SHOW commands

shell> mysqlshow [options] [db_name [tbl_name [col_name]]]

mysqlshow --help
mysqlshow --version

mysqlshow databaseName
mysqlshow --verbose dbname tab%

mysqlshow --login-path=mydb
mysqlshow --login-path=mydb testdb
mysqlshow --login-path=mydb testdb -v
mysqlshow --login-path=root devdb -v -v
mysqlshow --user=root --password=secret --host=localhost --port=3333 slavedb

mysqlshow --login-path=dba proddb users -v -v
mysqlshow --login-path=dba testdb forms 
mysqlshow --login-path=mydba testdb forms -i
mysqlshow --login-path=root devdb forms  -k


The following options may be given as the first argument:
--print-defaults         Print the program argument list and exit.
--no-defaults            Don't read default options from any option file, except for login file.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=#   Also read groups with concat(group, suffix)
--login-path=#                  Read this path from the login file.

  --bind-address=name IP address to bind to.
  -c, --character-sets-dir=name  Directory for character set files.
  --default-character-set=name   Set the default character set.
  --count              Show number of rows per table (may be slow for non-MyISAM tables).
  -C, --compress      Use compression in server/client protocol.
  -#, --debug[=name]   Output debug log. Often this is 'd:t:o,filename'.

  --debug-check        Check memory and open file usage at exit.
  --debug-info        Print some debug info at exit.
  --default-auth=name Default authentication client-side plugin to use.
  --enable-cleartext-plugin   Enable/disable the clear text authentication plugin.
  -?, --help          Display this help and exit.
  -h, --host=name      Connect to host.
  -i, --status        Shows a lot of extra information about each table.
  -k, --keys          Show keys for table.

  -p, --password[=name] Password to use when connecting to server. If password is not given, it's solicited on the tty.
  --plugin-dir=name    Directory for client-side plugins.
  -P, --port=#        Port number to use for connection or 0 for default to, in order of preference, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306).
  --protocol=name      The protocol to use for connection (tcp, socket, pipe, memory).
  --secure-auth        Refuse client connecting to server if it uses old (pre-4.1.1) protocol. Deprecated. Always TRUE
  -t, --show-table-type Show table type column.
  -S, --socket=name    The socket file to use for connection.

  --ssl-mode=name      SSL connection mode.
  --ssl                         Deprecated. Use --ssl-mode instead. (Defaults to on; use --skip-ssl to disable.)
  --ssl-verify-server-cert      Deprecated. Use --ssl-mode=VERIFY_IDENTITY instead.
  --ssl-ca=name        CA file in PEM format.
  --ssl-capath=name    CA directory.
  --ssl-cert=name      X509 cert in PEM format.
  --ssl-cipher=name    SSL cipher to use.
  --ssl-key=name      X509 key in PEM format.
  --ssl-crl=name      Certificate revocation list.
  --ssl-crlpath=name  Certificate revocation list path.

  --tls-version=name  TLS version to use, permitted values are: TLSv1, TLSv1.1, TLSv1.2
  -u, --user=name      User for login if not current user.
  -v, --verbose        More verbose output; you can use this multiple times to get even more verbose output.
  -V, --version        Output version information and exit.

mysqlshow variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
bind-address                   (No default value)
character-sets-dir            (No default value)
default-character-set       utf8
count                             FALSE
compress                       FALSE
debug-check                   FALSE
debug-info                      FALSE
default-auth                   (No default value)
enable-cleartext-plugin    FALSE
host                              (No default value)
status                            FALSE
keys                              FALSE
plugin-dir                       (No default value)
port                               3306
secure-auth                    TRUE
show-table-type              FALSE
socket                            /data/mysql/mysql.sock
ssl                                 TRUE
ssl-verify-server-cert       FALSE
ssl-ca                             (No default value)
ssl-capath                       (No default value)
ssl-cert                           (No default value)
ssl-cipher                        (No default value)
ssl-key                           (No default value)
ssl-crl                             (No default value)
ssl-crlpath                       (No default value)
tls-version                      (No default value)
user                               (No default value)

Related Articles: mysqldump commands


No comments:

Post a Comment