.TH "MYSQLSERVERINFO" "1" "May 09, 2012" "1.0.3" "MySQL Utilities" .SH NAME mysqlserverinfo \- Display common diagnostic information from a server . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructeredText. . .SH SYNOPSIS .sp .nf .ft C mysqlserverinfo [options] .ft P .fi .SH DESCRIPTION .sp This utility displays critical information about a server for use in diagnosing problems. The information displayed includes the following: .INDENT 0.0 .IP \(bu 2 Server connection information .IP \(bu 2 Server version number .IP \(bu 2 Data directory path name .IP \(bu 2 Base directory path name .IP \(bu 2 Plugin directory path name .IP \(bu 2 Configuration file location and name .IP \(bu 2 Current binary log coordinates (file name and position) .IP \(bu 2 Current relay log coordinates (file name and position) .UNINDENT .sp This utility can be used to see the diagnostic information for servers that are running or offline. If you want to see information about an offline server, the utility starts the server in read\-only mode. In this case, you must specify the \fI\%--basedir\fP, \fI\%--datadir\fP, and \fI\%--start\fP options to prevent the utility from starting an offline server accidentally. Note: Be sure to consider the ramifications of starting an offline server on the error and similar logs. It is best to save this information prior to running this utility. .sp To specify how to display output, use one of the following values with the \fI\-\-format\fP option: .INDENT 0.0 .TP .B \fBgrid\fP (default) Display output in grid or table format like that of the \fBmysql\fP monitor. .TP .B \fBcsv\fP Display output in comma\-separated values format. .TP .B \fBtab\fP Display output in tab\-separated format. .TP .B \fBvertical\fP Display output in single\-column format like that of the \fB\eG\fP command for the \fBmysql\fP monitor. .UNINDENT .sp To turn off the headers for \fBcsv\fP or \fBtab\fP display format, specify the \fI\%--no-headers\fP option. .sp To see the common default settings for the local server\(aqs configuration file, use the \fI\%--show-defaults\fP option. This option reads the configuration file on the machine where the utility is run, not the machine for the host that the \fI\%--server\fP option specifies. .sp To run the utility against several servers, specify the \fI\%--server\fP option multiple times. In this case, the utility attempts to connect to each server and read the information. .sp To see the MySQL servers running on the local machine, use the \fI\%--show-servers\fP option. This shows all the servers with their process ID and data directory. On Windows, the utility shows only the process ID and port. .SH OPTIONS .sp \fBmysqlserverinfo\fP accepts the following command\-line options: .INDENT 0.0 .TP .B \-\-help Display a help message and exit. .UNINDENT .INDENT 0.0 .TP .B \-\-basedir= The base directory for the server. This option is required for starting an offline server. .UNINDENT .INDENT 0.0 .TP .B \-\-datadir= The data directory for the server. This option is required for starting an offline server. .UNINDENT .INDENT 0.0 .TP .B \-\-format=, \-f Specify the output display format. Permitted format values are \fBgrid\fP, \fBcsv\fP, \fBtab\fP, and \fBvertical\fP. The default is \fBgrid\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-no\-headers, \-h Do not display column headers. This option applies only for \fBcsv\fP and \fBtab\fP output. .UNINDENT .INDENT 0.0 .TP .B \-\-port\-range= The port range to check for finding running servers. This option applies only to Windows and is ignored unless \fI\%--show-servers\fP is given. The default range is 3306:3333. .UNINDENT .INDENT 0.0 .TP .B \-\-server= Connection information for a server in <\fIuser\fP>[:<\fIpasswd\fP>]@<\fIhost\fP>[:<\fIport\fP>][:<\fIsocket\fP>] format. Use this option multiple times to see information for multiple servers. .UNINDENT .INDENT 0.0 .TP .B \-\-show\-defaults, \-d Display default settings for \fBmysqld\fP from the local configuration file. It uses \fBmy_print_defaults\fP to obtain the options. .UNINDENT .INDENT 0.0 .TP .B \-\-show\-servers Display information about servers running on the local host. The utility examines the host process list to determine which servers are running. .UNINDENT .INDENT 0.0 .TP .B \-\-start, \-s Start the server in read\-only mode if it is offline. With this option, you must also give the \fI\%--basedir\fP and \fI\%--datadir\fP options. .UNINDENT .INDENT 0.0 .TP .B \-\-verbose, \-v Specify how much information to display. Use this option multiple times to increase the amount of information. For example, \fI\-v\fP = verbose, \fI\-vv\fP = more verbose, \fI\-vvv\fP = debug. .UNINDENT .INDENT 0.0 .TP .B \-\-version Display version information and exit. .UNINDENT .sp For the \fI\-\-format\fP option, the permitted values are not case sensitive. In addition, values may be specified as any unambiguous prefix of a valid value. For example, \fI\-\-format=g\fP specifies the grid format. An error occurs if a prefix matches more than one valid value. .SH EXAMPLES .sp To display the server information for the local server and the settings for \fBmysqld\fP in the configuration file with the output in a vertical list, use this command: .sp .nf .ft C $ mysqlserverinfo \-\-server=root:pass@localhost \-d \-\-format=vertical # Source on localhost: ... connected. ************************* 1. row ************************* server: localhost:3306 version: 5.1.50\-log datadir: /usr/local/mysql/data/ basedir: /usr/local/mysql\-5.1.50\-osx10.6\-x86_64/ plugin_dir: /usr/local/mysql\-5.1.50\-osx10.6\-x86_64/lib/plugin config_file: /etc/my.cnf binary_log: my_log.000068 binary_log_pos: 212383 relay_log: None relay_log_pos: None 1 rows. Defaults for server localhost:3306 \-\-port=3306 \-\-basedir=/usr/local/mysql \-\-datadir=/usr/local/mysql/data \-\-server_id=5 \-\-log\-bin=my_log \-\-general_log \-\-slow_query_log \-\-innodb_data_file_path=ibdata1:778M;ibdata2:50M:autoextend #...done. .ft P .fi .SH COPYRIGHT .sp Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. .sp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .sp This program 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. .sp You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110\-1301 USA .SH AUTHOR MySQL Utilities Team .SH COPYRIGHT 2010, Oracle and/or its affiliates. All rights reserved. .\" Generated by docutils manpage writer. .\" .