2 .\" Title: \fBmysqladmin\fR
3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
6 .\" Manual: MySQL Database System
10 .TH "\FBMYSQLADMIN\FR" "1" "11/04/2013" "MySQL 5\&.1" "MySQL Database System"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 .\" administration: server
32 .\" server administration
34 mysqladmin \- client for administering a MySQL server
36 .HP \w'\fBmysqladmin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-options\fR\fR\fB]\ [\fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-options\fR\fR\fB]]\ \&.\&.\&.\fR\ 'u
37 \fBmysqladmin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-options\fR\fR\fB] [\fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-options\fR\fR\fB]] \&.\&.\&.\fR
41 is a client for performing administrative operations\&. You can use it to check the server\*(Aqs configuration and current status, to create and drop databases, and more\&.
51 shell> \fBmysqladmin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB] [\fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB]] \&.\&.\&.\fR
58 supports the following commands\&. Some of the commands take an argument following the command name\&.
70 Create a new database named
84 Tell the server to write debug information to the error log\&. Format and content of this information is subject to change\&.
86 Beginning with MySQL 5\&.1\&.12, this includes information about the Event Scheduler\&. See
87 Section\ \&19.4.5, \(lqEvent Scheduler Status\(rq\&.
100 Delete the database named
102 and all its tables\&.
115 Display the server status variables and their values\&.
128 Flush all information in the host cache\&.
154 Reload the grant tables (same as
168 Clear status variables\&.
194 Flush the thread cache\&.
205 kill \fIid\fR,\fIid\fR,\&.\&.\&.
207 Kill server threads\&. If multiple thread ID values are given, there must be no spaces in the list\&.
218 old\-password \fInew\-password\fR
222 command but stores the password using the old (pre\-4\&.1) password\-hashing format\&. (See
223 Section\ \&6.1.2.4, \(lqPassword Hashing in MySQL\(rq\&.)
234 password \fInew\-password\fR
236 Set a new password\&. This changes the password to
238 for the account that you use with
240 for connecting to the server\&. Thus, the next time you invoke
242 (or any other client program) using the same account, you will need to specify the new password\&.
246 value contains spaces or other characters that are special to your command interpreter, you need to enclose it within quotation marks\&. On Windows, be sure to use double quotation marks rather than single quotation marks; single quotation marks are not stripped from the password, but rather are interpreted as part of the password\&. For example:
252 shell> \fBmysqladmin password "my new password"\fR
262 .nr an-no-space-flag 1
269 Do not use this command used if the server was started with the
270 \fB\-\-skip\-grant\-tables\fR
271 option\&. No password change will be applied\&. This is true even if you precede the
275 on the same command line to re\-enable the grant tables because the flush operation occurs after you connect\&. However, you can use
276 \fBmysqladmin flush\-privileges\fR
277 to re\-enable the grant table and then use a separate
278 \fBmysqladmin password\fR
279 command to change the password\&.
294 Check whether the server is available\&. The return status from
296 is 0 if the server is running, 1 if it is not\&. This is 0 even in case of an error such as
297 Access denied, because this means that the server is running but refused the connection, which is different from the server not running\&.
310 Show a list of active server threads\&. This is like the output of the
314 option is given, the output is like that of
315 SHOW FULL PROCESSLIST\&. (See
316 Section\ \&13.7.5.31, \(lqSHOW PROCESSLIST Syntax\(rq\&.)
329 Reload the grant tables\&.
342 Flush all tables and close and open log files\&.
368 Start replication on a slave server\&.
381 Display a short server status message\&.
394 Stop replication on a slave server\&.
407 Display the server system variables and their values\&.
420 Display version information from the server\&.
423 All commands can be shortened to any unique prefix\&. For example:
429 shell> \fBmysqladmin proc stat\fR
430 +\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
431 | Id | User | Host | db | Command | Time | State | Info |
432 +\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
433 | 51 | monty | localhost | | Query | 0 | | show processlist |
434 +\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
435 Uptime: 1473624 Threads: 1 Questions: 39487
436 Slow queries: 0 Opens: 541 Flush tables: 1
437 Open tables: 19 Queries per second avg: 0\&.0268
443 .\" status command: results
446 \fBmysqladmin status\fR
447 command result displays the following values:
460 The number of seconds the MySQL server has been running\&.
474 The number of active threads (clients)\&.
488 The number of questions (queries) from clients since the server was started\&.
502 The number of queries that have taken more than
505 Section\ \&5.2.5, \(lqThe Slow Query Log\(rq\&.
519 The number of tables the server has opened\&.
538 commands the server has executed\&.
552 The number of tables that currently are open\&.
566 The amount of memory allocated directly by
567 \fBmysqld\fR\&. This value is displayed only when MySQL has been compiled with
568 \fB\-\-with\-debug=full\fR\&.
579 .\" maximum memory used
582 The maximum amount of memory allocated directly by
583 \fBmysqld\fR\&. This value is displayed only when MySQL has been compiled with
584 \fB\-\-with\-debug=full\fR\&.
588 \fBmysqladmin shutdown\fR
589 when connecting to a local server using a Unix socket file,
591 waits until the server\*(Aqs process ID file has been removed, to ensure that the server has stopped properly\&.
592 .\" mysqladmin command options
593 .\" command options: mysqladmin
594 .\" options: command-line: mysqladmin
595 .\" startup parameters: mysqladmin
598 supports the following options, which can be specified on the command line or in the
602 groups of an option file\&.
604 also supports the options for processing option files described at
605 Section\ \&4.2.3.4, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
615 .\" mysqladmin: help option
616 .\" help option: mysqladmin
620 Display a help message and exit\&.
631 .\" mysqladmin: bind-address option
632 .\" bind-address option: mysqladmin
633 \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR
635 On a computer having multiple network interfaces, this option can be used to select which interface is employed when connecting to the MySQL server\&.
637 This option is supported only in the version of
639 that is supplied with MySQL Cluster, beginning with MySQL Cluster NDB 6\&.3\&.4\&. It is not available in standard MySQL 5\&.1 releases\&.
650 .\" mysqladmin: character-sets-dir option
651 .\" character-sets-dir option: mysqladmin
652 \fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
654 The directory where character sets are installed\&. See
655 Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
666 .\" mysqladmin: compress option
667 .\" compress option: mysqladmin
671 Compress all information sent between the client and the server if both support compression\&.
682 .\" mysqladmin: count option
683 .\" count option: mysqladmin
684 \fB\-\-count=\fR\fB\fIN\fR\fR,
685 \fB\-c \fR\fB\fIN\fR\fR
687 The number of iterations to make for repeated command execution if the
700 .\" mysqladmin: debug option
701 .\" debug option: mysqladmin
702 \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
703 \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR
705 Write a debugging log\&. A typical
708 \*(Aqd:t:o,\fIfile_name\fR\*(Aq\&. The default is
709 \*(Aqd:t:o,/tmp/mysqladmin\&.trace\*(Aq\&.
720 .\" mysqladmin: debug-check option
721 .\" debug-check option: mysqladmin
722 \fB\-\-debug\-check\fR
724 Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
735 .\" mysqladmin: debug-info option
736 .\" debug-info option: mysqladmin
737 \fB\-\-debug\-info\fR
739 Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.14\&.
750 .\" mysqladmin: default-character-set option
751 .\" default-character-set option: mysqladmin
752 \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR
756 as the default character set\&. See
757 Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
768 .\" mysqladmin: force option
769 .\" force option: mysqladmin
773 Do not ask for confirmation for the
775 command\&. With multiple commands, continue even if an error occurs\&.
786 .\" mysqladmin: host option
787 .\" host option: mysqladmin
788 \fB\-\-host=\fR\fB\fIhost_name\fR\fR,
789 \fB\-h \fR\fB\fIhost_name\fR\fR
791 Connect to the MySQL server on the given host\&.
802 .\" mysqladmin: no-beep option
803 .\" no-beep option: mysqladmin
807 Suppress the warning beep that is emitted by default for errors such as a failure to connect to the server\&. This option was added in MySQL 5\&.1\&.17\&.
818 .\" mysqladmin: password option
819 .\" password option: mysqladmin
820 \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
821 \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR
823 The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you
825 have a space between the option and the password\&. If you omit the
831 option on the command line,
835 Specifying a password on the command line should be considered insecure\&. See
836 Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
847 .\" mysqladmin: pipe option
848 .\" pipe option: mysqladmin
852 On Windows, connect to the server using a named pipe\&. This option applies only if the server supports named\-pipe connections\&.
863 .\" mysqladmin: port option
864 .\" port option: mysqladmin
865 \fB\-\-port=\fR\fB\fIport_num\fR\fR,
866 \fB\-P \fR\fB\fIport_num\fR\fR
868 The TCP/IP port number to use for the connection\&.
879 .\" mysqladmin: protocol option
880 .\" protocol option: mysqladmin
881 \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
883 The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see
884 Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
895 .\" mysqladmin: relative option
896 .\" relative option: mysqladmin
900 Show the difference between the current and previous values when used with the
902 option\&. This option works only with the
915 .\" mysqladmin: silent option
916 .\" silent option: mysqladmin
920 Exit silently if a connection to the server cannot be established\&.
931 .\" mysqladmin: sleep option
932 .\" sleep option: mysqladmin
933 \fB\-\-sleep=\fR\fB\fIdelay\fR\fR,
934 \fB\-i \fR\fB\fIdelay\fR\fR
936 Execute commands repeatedly, sleeping for
938 seconds in between\&. The
940 option determines the number of iterations\&. If
944 executes commands indefinitely until interrupted\&.
955 .\" mysqladmin: socket option
956 .\" socket option: mysqladmin
957 \fB\-\-socket=\fR\fB\fIpath\fR\fR,
958 \fB\-S \fR\fB\fIpath\fR\fR
961 localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&.
972 .\" mysqladmin: SSL options
973 .\" SSL options: mysqladmin
976 Options that begin with
978 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
979 Section\ \&6.3.6.4, \(lqSSL Command Options\(rq\&.
990 .\" mysqladmin: user option
991 .\" user option: mysqladmin
992 \fB\-\-user=\fR\fB\fIuser_name\fR\fR,
993 \fB\-u \fR\fB\fIuser_name\fR\fR
995 The MySQL user name to use when connecting to the server\&.
1000 \h'-04'\(bu\h'+03'\c
1006 .\" mysqladmin: verbose option
1007 .\" verbose option: mysqladmin
1011 Verbose mode\&. Print more information about what the program does\&.
1016 \h'-04'\(bu\h'+03'\c
1022 .\" mysqladmin: version option
1023 .\" version option: mysqladmin
1027 Display version information and exit\&.
1032 \h'-04'\(bu\h'+03'\c
1038 .\" mysqladmin: vertical option
1039 .\" vertical option: mysqladmin
1043 Print output vertically\&. This is similar to
1044 \fB\-\-relative\fR, but prints output vertically\&.
1049 \h'-04'\(bu\h'+03'\c
1055 .\" mysqladmin: wait option
1056 .\" wait option: mysqladmin
1057 \fB\-\-wait[=\fR\fB\fIcount\fR\fR\fB]\fR,
1058 \fB\-w[\fR\fB\fIcount\fR\fR\fB]\fR
1060 If the connection cannot be established, wait and retry instead of aborting\&. If a
1062 value is given, it indicates the number of times to retry\&. The default is one time\&.
1065 You can also set the following variables by using
1066 \fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
1068 \fB\-\-set\-variable\fR
1069 format is deprecated and is removed in MySQL 5\&.5\&.
1073 \h'-04'\(bu\h'+03'\c
1079 .\" connect_timeout variable
1080 .\" timeout: connect_timeout variable
1083 The maximum number of seconds before connection timeout\&. The default value is 43200 (12 hours)\&.
1088 \h'-04'\(bu\h'+03'\c
1094 .\" shutdown_timeout variable
1095 .\" timeout: shutdown_timeout variable
1098 The maximum number of seconds to wait for server shutdown\&. The default value is 3600 (1 hour)\&.
1103 Copyright \(co 1997, 2013, Oracle and/or its affiliates. All rights reserved.
1105 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
1107 This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
1109 You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
1112 For more information, please refer to the MySQL Reference Manual,
1113 which may already be installed locally and which is also available
1114 online at http://dev.mysql.com/doc/.
1116 Oracle Corporation (http://dev.mysql.com/).