MySql

From SoylentNews
Revision as of 18:25, 8 March 2014 by AudioGuy (talk | contribs)
Jump to navigation Jump to search

as root: mysqldump altslashdot css > zz.txt

mysqldump -T '/var/lib/mysql/test' altslashdot css

Information about mysql as used for slash on slashcott

Database Name: altslashdot
Database user: mysql

Version

mysql-5.5.36
db4-devel-4.7.25                     mysql-libs-5.5.36
db4-utils-4.7.25                     mysql-server-5.5.36


mysqldump

mysqldump http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html

A client that dumps a MySQL database into a file as SQL, text, or XML.

The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.

Syntax 

There are in general three ways to use mysqldump—in order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server—as shown here: 
shell> mysqldump [options] db_name [tbl_name ...]
shell> mysqldump [options] --databases db_name ...
shell> mysqldump [options] --all-databases

To dump entire databases, do not name any tables following db_name, or use the --databases or --all-databases option.

mysqldump does not dump the INFORMATION_SCHEMA database by default. mysqldump dumps INFORMATION_SCHEMA only if you name it explicitly on the command line, although currently you must also use the --skip-lock-tables option. Before MySQL 5.5 mysqldump silently ignores INFORMATION_SCHEMA even if you name it explicitly on the command line.

mysqldump does not dump the performance_schema database.

Before MySQL 5.5.25, mysqldump does not dump the general_log or slow_query_log tables for dumps of the mysql database. As of 5.5.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file. Log table contents are not dumped.

mysqldump also does not dump the MySQL Cluster ndbinfo information database.

To see a list of the options your version of mysqldump supports, execute mysqldump --help.


table dump for size deletemelater

[root@slashcode test]# ls -l | cut -b 28-  | grep -v '\.sql' | sort -g

     0 Mar  2 20:56 accesslog_artcom.txt
     0 Mar  2 20:56 accesslog_temp_subscriber.txt
     0 Mar  2 20:56 al2_log_comments.txt
     0 Mar  2 20:56 al2_log.txt
     0 Mar  2 20:56 auto_poll.txt
     0 Mar  2 20:56 backup_blocks.txt
     0 Mar  2 20:56 blobs.txt
     0 Mar  2 20:56 bookmark_feeds.txt
     0 Mar  2 20:56 bookmarks.txt
     0 Mar  2 20:56 classes.txt
     0 Mar  2 20:56 comment_log.txt
     0 Mar  2 20:56 comment_promote_log.txt
     0 Mar  2 20:56 comment_vote.txt
     0 Mar  2 20:56 dbs_readerstatus_queries.txt
     0 Mar  2 20:56 dbs_readerstatus.txt
     0 Mar  2 20:56 dbs.txt
     0 Mar  2 20:56 discussion_rating.txt
     0 Mar  2 20:56 email_optout.txt
     0 Mar  2 20:56 file_queue.txt
     0 Mar  2 20:56 firehose_history.txt
     0 Mar  2 20:56 firehose_section_settings.txt
     0 Mar  2 20:56 firehose_section.txt
     0 Mar  2 20:56 firehose_setting_log.txt
     0 Mar  2 20:56 firehose_skin_volume.txt
     0 Mar  2 20:56 firehose_view_settings.txt
     0 Mar  2 20:56 globj_adminnotes.txt
     0 Mar  2 20:56 globjs_viewed_archived.txt
     0 Mar  2 20:56 globjs_viewed.txt
     0 Mar  2 20:56 globj_urls.txt
     0 Mar  2 20:56 humanconf_pool.txt
     0 Mar  2 20:56 humanconf.txt
     0 Mar  2 20:56 journal_transfer.txt
     0 Mar  2 20:56 message_drop.txt
     0 Mar  2 20:56 metamodlog.txt
     0 Mar  2 20:56 misc_user_opts.txt
     0 Mar  2 20:56 newsvac_keywords.txt
     0 Mar  2 20:56 nugget_sub.txt
     0 Mar  2 20:56 pagemark.txt
     0 Mar  2 20:56 preview.txt
     0 Mar  2 20:56 projects.txt
     0 Mar  2 20:56 querylog.txt
     0 Mar  2 20:56 related_stories.txt
     0 Mar  2 20:56 rel.txt
     0 Mar  2 20:56 remarks.txt
     0 Mar  2 20:56 reskey_failures.txt
     0 Mar  2 20:56 reskey_sessions.txt
     0 Mar  2 20:56 robosubmitlock.txt
     0 Mar  2 20:56 rss_raw.txt
     0 Mar  2 20:56 sphinx_counter_archived.txt
     0 Mar  2 20:56 sphinx_counter.txt
     0 Mar  2 20:56 sphinx_search.txt
     0 Mar  2 20:56 spiderlock.txt
     0 Mar  2 20:56 spider_timespec.txt
     0 Mar  2 20:56 static_files.txt
     0 Mar  2 20:56 stats_graphs_index.txt
     0 Mar  2 20:56 story_dirty.txt
     0 Mar  2 20:56 story_files.txt
     0 Mar  2 20:56 story_render_dirty.txt
     0 Mar  2 20:56 submissions_notes.txt
     0 Mar  2 20:56 subscribe_payments.txt
     0 Mar  2 20:56 tagboxes.txt
     0 Mar  2 20:56 tagboxlog_feeder.txt
     0 Mar  2 20:56 tagcommand_adminlog_sfnet.txt
     0 Mar  2 20:56 tagcommand_adminlog.txt
     0 Mar  2 20:56 tagname_cache.txt
     0 Mar  2 20:56 tagname_params.txt
     0 Mar  2 20:56 tagnames_similarity_rendered.txt
     0 Mar  2 20:56 tagnames_synonyms_chosen.txt
     0 Mar  2 20:56 tag_params.txt
     0 Mar  2 20:56 tags_dayofweek.txt
     0 Mar  2 20:56 tags_deactivated.txt
     0 Mar  2 20:56 tags_hourofday.txt
     0 Mar  2 20:56 tags_peerweight.txt
     0 Mar  2 20:56 tags_searched.txt
     0 Mar  2 20:56 tags.txt
     0 Mar  2 20:56 tags_userchange.txt
     0 Mar  2 20:56 topic_nexus_dirty.txt
     0 Mar  2 20:56 topic_nexus_extras.txt
     0 Mar  2 20:56 topic_param.txt
     0 Mar  2 20:56 url_content.txt
     0 Mar  2 20:56 url_message_body.txt
     0 Mar  2 20:56 url_plaintext.txt
     0 Mar  2 20:56 urls.txt
     0 Mar  2 20:56 users_acl.txt
     0 Mar  2 20:56 users_clout.txt
     0 Mar  2 20:56 users_comments_read_log.txt
     0 Mar  2 20:56 users_openid_reskeys.txt
     0 Mar  2 20:56 users_openid.txt
     0 Mar  2 20:56 wow_char_armorylog.txt
     0 Mar  2 20:56 wow_char_data.txt
     0 Mar  2 20:56 wow_chars.txt
     0 Mar  2 20:56 wow_guilds.txt
     0 Mar  2 20:56 xsite_auth_log.txt
    12 Mar  2 20:56 tagnames.txt
    14 Mar  2 20:56 topic_nexus.txt
    20 Mar  2 20:56 shill_ids.txt
    22 Mar  2 20:56 accesslog_build_unique_uid.txt
    36 Mar  2 20:56 message_deliverymodes.txt
    41 Mar  2 20:56 al2.txt
    42 Mar  2 20:56 journal_themes.txt
    49 Mar  2 20:56 topic_parents.txt
    66 Mar  2 20:56 commentmodes.txt
    69 Mar  2 20:56 dynamic_blocks.txt
    69 Mar  2 20:56 wow_char_types.txt
    73 Mar  2 20:56 accesslog_temp_host_addr.txt
    74 Mar  2 20:56 globj_types.txt
    75 Mar  2 20:56 css_type.txt
    81 Mar  2 20:56 open_proxies.txt
    83 Mar  2 20:56 people.txt
    86 Mar  2 20:56 discussion_kinds.txt
    94 Mar  2 20:56 clout_types.txt
   103 Mar  2 20:56 sphinx_index.txt
   111 Mar  2 20:56 sessions.txt
   114 Mar  2 20:56 dst.txt
   116 Mar  2 20:56 pollvoters.txt
   121 Mar  2 20:56 hooks.txt
   136 Mar  2 20:56 authors_cache.txt
   138 Mar  2 20:56 globjs.txt
   144 Mar  2 20:56 story_topics_rendered.txt
   163 Mar  2 20:56 humanconf_questions.txt
   176 Mar  2 20:56 tags_udc.txt
   187 Mar  2 20:56 story_topics_chosen.txt
   198 Mar  2 20:56 url_info.txt
   230 Mar  2 20:56 spamarmors.txt
   272 Mar  2 20:56 al2_types.txt
   280 Mar  2 20:56 modreasons.txt
   311 Mar  2 20:56 bpn_sources.txt
   333 Mar  2 20:56 skins.txt
   344 Mar  2 20:56 moderatorlog.txt
   353 Mar  2 20:56 submission_param.txt
   371 Mar  2 20:56 pollquestions.txt
   422 Mar  2 20:56 topics.txt
   435 Mar  2 20:56 soap_methods.txt
   468 Mar  2 20:56 reskey_resources.txt
   488 Mar  2 20:56 journals.txt
   489 Mar  2 20:56 preview_param.txt
   495 Mar  2 20:56 accesslog_build_uidip.txt
   540 Mar  2 20:56 skin_colors.txt
   607 Mar  2 20:56 pollanswers.txt
   616 Mar  2 20:56 badpasswords.txt
   638 Mar  2 20:56 story_param.txt
   658 Mar  2 20:56 message_codes.txt
   706 Mar  2 20:56 related_links.txt
   743 Mar  2 20:56 dateformats.txt
   859 Mar  2 20:56 reskeys.txt
   890 Mar  2 20:56 achievements.txt
   972 Mar  2 20:56 signoff.txt
  1018 Mar  2 20:56 users_prefs.txt
  1122 Mar  2 20:56 css.txt
  1294 Mar  2 20:56 ajax_ops.txt
  1303 Mar  2 20:56 tzcodes.txt
  1312 Mar  2 20:56 users_index.txt
  1316 Mar  2 20:56 users_hits.txt
  1529 Mar  2 20:56 message_web.txt
  1543 Mar  2 20:56 user_achievement_streaks.txt
  1778 Mar  2 20:56 code_param.txt
  2047 Mar  2 20:56 content_filters.txt
  2132 Mar  2 20:56 reskey_hourlysalt.txt
  2163 Mar  2 20:56 stories.txt
  2430 Mar  2 20:56 users_comments.txt
  2951 Mar  2 20:56 site_info.txt
  3180 Mar  2 20:56 users_messages.txt
  3385 Mar  2 20:56 slashd_status.txt
  3595 Mar  2 20:56 menus.txt
  3784 Mar  2 20:56 discussions.txt
  4048 Mar  2 20:56 abusers.txt
  4087 Mar  2 20:56 user_achievements.txt
  4507 Mar  2 20:56 uncommonstorywords.txt
  5099 Mar  2 20:56 accesslog_temp_rss.txt
  5330 Mar  2 20:56 users.txt
  6469 Mar  2 20:56 reskey_vars.txt
  6619 Mar  2 20:56 blocks.txt
  7016 Mar  2 20:56 reskey_resource_checks.txt
  7373 Mar  2 20:56 journals_text.txt
  7613 Mar  2 20:56 users_logtokens.txt
  9144 Mar  2 20:56 formkeys.txt
 10087 Mar  2 20:56 users_param.txt
 10099 Mar  2 20:56 message_web_text.txt
 10570 Mar  2 20:56 string_param.txt
 10691 Mar  2 20:56 users_info.txt
 10809 Mar  2 20:56 wow_realms.txt
 11398 Mar  2 20:56 comments.txt
 13957 Mar  2 20:56 message_log.txt
 14980 Mar  2 20:56 comment_text.txt
018561 Mar  2 20:56 accesslog_admin.txt
 24852 Mar  2 20:56 accesslog_temp_other.txt
 50104 Mar  2 20:56 vars.txt
 57261 Mar  2 20:56 submissions.txt
 68640 Mar  2 20:56 dynamic_user_blocks.txt
 84260 Mar  2 20:56 story_text.txt
256371 Mar  2 20:56 slashd_errnotes.txt
283635 Mar  2 20:56 accesslog_temp_errors.txt
431983 Mar  2 20:56 accesslog_temp.txt
579455 Mar  2 20:56 accesslog.txt
869491 Mar  2 20:56 stats_daily.txt
917375 Mar  2 20:56 templates.txt

Mysql programs

All these try PROGNAME --help for details

also http://dev.mysql.com/doc/refman/5.5/en/programs-overview.html


The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server:

mysqld

The SQL daemon (that is, the MySQL server). To use client programs, mysqld must be running, because clients gain access to databases by connecting to the server. See Section 4.3.1, “mysqld — The MySQL Server”.

mysqld_safe

A server startup script. mysqld_safe attempts to start mysqld. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”.

mysql.server

A server startup script. This script is used on systems that use System V-style run directories containing scripts that start system services for particular run levels. It invokes mysqld_safe to start the MySQL server. See Section 4.3.3, “mysql.server — MySQL Server Startup Script”.

mysqld_multi

A server startup script that can start or stop multiple servers installed on the system. See Section 4.3.4, “mysqld_multi — Manage Multiple MySQL Servers”.

Several programs perform setup operations during MySQL installation or upgrading:

comp_err

This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See Section 4.4.1, “comp_err — Compile MySQL Error Message File”.

mysql_install_db

This script creates the MySQL database and initializes the grant tables with default privileges. It is usually executed only once, when first installing MySQL on a system. See Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”, Section 2.10.1, “Postinstallation Procedures for Unix-like Systems”, and Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”.

mysql_plugin

This program configures MySQL server plugins. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”.

mysql_secure_installation

This program enables you to improve the security of your MySQL installation. SQL. See Section 4.4.5, “mysql_secure_installation — Improve MySQL Installation Security”.

mysql_tzinfo_to_sql

This program loads the time zone tables in the mysql database using the contents of the host system zoneinfo database (the set of files describing time zones). SQL. See Section 4.4.6, “mysql_tzinfo_to_sql — Load the Time Zone Tables”.

mysql_upgrade

This program is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary, and updates the grant tables with any changes that have been made in newer versions of MySQL. See Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”.

MySQL client programs that connect to the MySQL server:

mysql

The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”.

mysqladmin

A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”.

mysqlcheck

A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 4.5.3, “mysqlcheck — A Table Maintenance Program”.

mysqldump

A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 4.5.4, “mysqldump — A Database Backup Program”.

mysqlimport

A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 4.5.5, “mysqlimport — A Data Import Program”.

mysqlshow

A client that displays information about databases, tables, columns, and indexes. See Section 4.5.6, “mysqlshow — Display Database, Table, and Column Information”.

mysqlslap

A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”.

MySQL administrative and utility programs:

innochecksum

An offline InnoDB offline file checksum utility. See Section 4.6.1, “innochecksum — Offline InnoDB File Checksum Utility”.

myisam_ftdump

A utility that displays information about full-text indexes in MyISAM tables. See Section 4.6.2, “myisam_ftdump — Display Full-Text Index information”.

myisamchk

A utility to describe, check, optimize, and repair MyISAM tables. See Section 4.6.3, “myisamchk — MyISAM Table-Maintenance Utility”.

myisamlog

A utility that processes the contents of a MyISAM log file. See Section 4.6.4, “myisamlog — Display MyISAM Log File Contents”.

myisampack

A utility that compresses MyISAM tables to produce smaller read-only tables. See Section 4.6.5, “myisampack — Generate Compressed, Read-Only MyISAM Tables”.

mysqlaccess

A script that checks the access privileges for a host name, user name, and database combination. See Section 4.6.6, “mysqlaccess — Client for Checking Access Privileges”.

mysqlbinlog

A utility for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash. See Section 4.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”.

mysqldumpslow

A utility to read and summarize the contents of a slow query log. See Section 4.6.8, “mysqldumpslow — Summarize Slow Query Log Files”.

mysqlhotcopy

A utility that quickly makes backups of MyISAM tables while the server is running. See Section 4.6.9, “mysqlhotcopy — A Database Backup Program”.

mysql_convert_table_format

A utility that converts tables in a database to use a given storage engine. See Section 4.6.10, “mysql_convert_table_format — Convert Tables to Use a Given Storage Engine”.

mysql_find_rows

A utility that reads files containing SQL statements (such as update logs) and extracts statements that match a given regular expression. See Section 4.6.11, “mysql_find_rows — Extract SQL Statements from Files”.

mysql_fix_extensions

A utility that converts the extensions for MyISAM table files to lowercase. This can be useful after transferring the files from a system with case-insensitive file names to a system with case-sensitive file names. See Section 4.6.12, “mysql_fix_extensions — Normalize Table File Name Extensions”.

mysql_setpermission

A utility for interactively setting permissions in the MySQL grant tables. See Section 4.6.13, “mysql_setpermission — Interactively Set Permissions in Grant Tables”.

mysql_waitpid

A utility that kills the process with a given process ID. See Section 4.6.14, “mysql_waitpid — Kill Process and Wait for Its Termination”.

mysql_zap

A utility that kills processes that match a pattern. See Section 4.6.15, “mysql_zap — Kill Processes That Match a Pattern”.

MySQL program-development utilities:

msql2mysql

A shell script that converts mSQL programs to MySQL. It doesn't handle every case, but it gives a good start when converting. See Section 4.7.1, “msql2mysql — Convert mSQL Programs for Use with MySQL”.

mysql_config

A shell script that produces the option values needed when compiling MySQL programs. See Section 4.7.2, “mysql_config — Display Options for Compiling Clients”.

my_print_defaults

A utility that shows which options are present in option groups of option files. See Section 4.7.3, “my_print_defaults — Display Options from Option Files”.

resolve_stack_dump

A utility program that resolves a numeric stack trace dump to symbols. See Section 4.7.4, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”.

Miscellaneous utilities:

perror

A utility that displays the meaning of system or MySQL error codes. See Section 4.8.1, “perror — Explain Error Codes”.

replace

A utility program that performs string replacement in the input text. See Section 4.8.2, “replace — A String-Replacement Utility”.

resolveip

A utility program that resolves a host name to an IP address or vice versa. See Section 4.8.3, “resolveip — Resolve Host name to IP Address or Vice Versa”.

Oracle Corporation also provides the MySQL Workbench GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL. Additional GUI tools include MySQL Notifier for Microsoft Windows MySQL for Excel.

MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables.

Environment Variable	Meaning
MYSQL_UNIX_PORT	The default Unix socket file; used for connections to localhost
MYSQL_TCP_PORT	The default port number; used for TCP/IP connections
MYSQL_PWD	The default password
MYSQL_DEBUG	Debug trace options when debugging
TMPDIR	The directory where temporary tables and files are created

For a full list of environment variables used by MySQL programs, see Section 2.12, “Environment Variables”.



Mysql configuration file in /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# Settings user and group are ignored when systemd is used (fedora >= 15).
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
user=mysql

# Semisynchronous Replication
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html
# uncomment next line on MASTER
;plugin-load=rpl_semi_sync_master=semisync_master.so
# uncomment next line on SLAVE
;plugin-load=rpl_semi_sync_slave=semisync_slave.so

# Others options for Semisynchronous Replication
;rpl_semi_sync_master_enabled=1
;rpl_semi_sync_master_timeout=10
;rpl_semi_sync_slave_enabled=1

# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
;performance_schema


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


mysql --help

mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Usage: mysql [OPTIONS] [database]
  -?, --help          Display this help and exit.
  -I, --help          Synonym for -?
  --auto-rehash       Enable automatic rehashing. One doesn't need to use
                      'rehash' to get table and field completion, but startup
                      and reconnecting may take a longer time. Disable with
                      --disable-auto-rehash.
                      (Defaults to on; use --skip-auto-rehash to disable.)
  -A, --no-auto-rehash 
                      No automatic rehashing. One has to use 'rehash' to get
                      table and field completion. This gives a quicker start of
                      mysql and disables rehashing on reconnect.
  --auto-vertical-output 
                      Automatically switch to vertical output mode if the
                      result is wider than the terminal width.
  -B, --batch         Don't use history file. Disable interactive behavior.
                      (Enables --silent.)
  --character-sets-dir=name 
                      Directory for character set files.
  --column-type-info  Display column type information.
  -c, --comments      Preserve comments. Send comments to the server. The
                      default is --skip-comments (discard comments), enable
                      with --comments.
  -C, --compress      Use compression in server/client protocol.
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.
  --debug-check       Check memory and open file usage at exit.
  -T, --debug-info    Print some debug info at exit.
  -D, --database=name Database to use.
  --default-character-set=name 
                      Set the default character set.
  --delimiter=name    Delimiter to be used.
  --enable-cleartext-plugin 
                      Enable/disable the clear text authentication plugin.
  -e, --execute=name  Execute command and quit. (Disables --force and history
                      file.)
  -E, --vertical      Print the output of a query (rows) vertically.
  -f, --force         Continue even if we get an SQL error.
  -G, --named-commands 
                      Enable named commands. Named commands mean this program's
                      internal commands; see mysql> help . When enabled, the
                      named commands can be used from any line of the query,
                      otherwise only from the first line, before an enter.
                      Disable with --disable-named-commands. This option is
                      disabled by default.
  -i, --ignore-spaces Ignore space after function names.
  --init-command=name SQL Command to execute when connecting to MySQL server.
                      Will automatically be re-executed when reconnecting.
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.
  -b, --no-beep       Turn off beep on error.
  -h, --host=name     Connect to host.
  -H, --html          Produce HTML output.
  -X, --xml           Produce XML output.
  --line-numbers      Write line numbers for errors.
                      (Defaults to on; use --skip-line-numbers to disable.)
  -L, --skip-line-numbers 
                      Don't write line number for errors.
  -n, --unbuffered    Flush buffer after each query.
  --column-names      Write column names in results.
                      (Defaults to on; use --skip-column-names to disable.)
  -N, --skip-column-names 
                      Don't write column names in results.
  --sigint-ignore     Ignore SIGINT (CTRL-C).
  -o, --one-database  Ignore statements except those that occur while the
                      default database is the one named at the command line.
  --pager[=name]      Pager to use to display results. If you don't supply an
                      option, the default pager is taken from your ENV variable
                      PAGER. Valid pagers are less, more, cat [> filename],
                      etc. See interactive help (\h) also. This option does not
                      work in batch mode. Disable with --disable-pager. This
                      option is disabled by default.
  -p, --password[=name] 
                      Password to use when connecting to server. If password is
                      not given it's asked from the tty.
  -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).
  --prompt=name       Set the mysql prompt to this value.
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,
                      memory).
  -q, --quick         Don't cache result, print it row by row. This may slow
                      down the server if the output is suspended. Doesn't use
                      history file.
  -r, --raw           Write fields without conversion. Used with --batch.
  --reconnect         Reconnect if the connection is lost. Disable with
                      --disable-reconnect. This option is enabled by default.
                      (Defaults to on; use --skip-reconnect to disable.)
  -s, --silent        Be more silent. Print results with a tab as separator,
                      each row on new line.
  -S, --socket=name   The socket file to use for connection.
  --ssl               Enable SSL for connection (automatically enabled with
                      other flags).
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies
                      --ssl).
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).
  --ssl-cipher=name   SSL cipher to use (implies --ssl).
  --ssl-key=name      X509 key in PEM format (implies --ssl).
  --ssl-verify-server-cert 
                      Verify server's "Common Name" in its cert against
                      hostname used when connecting. This option is disabled by
                      default.
  -t, --table         Output in table format.
  --tee=name          Append everything into outfile. See interactive help (\h)
                      also. Does not work in batch mode. Disable with
                      --disable-tee. This option is disabled by default.
  -u, --user=name     User for login if not current user.
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.
  -v, --verbose       Write more. (-v -v -v gives the table output format).
  -V, --version       Output version information and exit.
  -w, --wait          Wait and retry if connection is down.
  --connect-timeout=# Number of seconds before connection timeout.
  --max-allowed-packet=# 
                      The maximum packet length to send to or receive from
                      server.
  --net-buffer-length=# 
                      The buffer size for TCP/IP and socket communication.
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.
  --max-join-size=#   Automatic limit for rows in a join when using
                      --safe-updates.
  --secure-auth       Refuse client connecting to server if it uses old
                      (pre-4.1.1) protocol.
  --server-arg=name   Send embedded server this as a parameter.
  --show-warnings     Show warnings after every statement.
  --plugin-dir=name   Directory for client-side plugins.
  --default-auth=name Default authentication client-side plugin to use.

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf 
The following groups are read: mysql client
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.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
auto-rehash                       TRUE
auto-vertical-output              FALSE
character-sets-dir                (No default value)
column-type-info                  FALSE
comments                          FALSE
compress                          FALSE
debug-check                       FALSE
debug-info                        FALSE
database                          (No default value)
default-character-set             auto
delimiter                         ;
enable-cleartext-plugin           FALSE
vertical                          FALSE
force                             FALSE
named-commands                    FALSE
ignore-spaces                     FALSE
init-command                      (No default value)
local-infile                      FALSE
no-beep                           FALSE
host                              (No default value)
html                              FALSE
xml                               FALSE
line-numbers                      TRUE
unbuffered                        FALSE
column-names                      TRUE
sigint-ignore                     FALSE
port                              0
prompt                            mysql> 
quick                             FALSE
raw                               FALSE
reconnect                         TRUE
socket                            (No default value)
ssl                               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-verify-server-cert            FALSE
table                             FALSE
user                              (No default value)
safe-updates                      FALSE
i-am-a-dummy                      FALSE
connect-timeout                   0
max-allowed-packet                16777216
net-buffer-length                 16384
select-limit                      1000
max-join-size                     1000000
secure-auth                       FALSE
show-warnings                     FALSE
plugin-dir                        (No default value)
default-auth                      (No default value)