Author: paul
Date: 2006-01-19 22:17:55 +0100 (Thu, 19 Jan 2006)
New Revision: 936
Log:
r6457@frost: paul | 2006-01-19 14:11:29 -0600
General revisions.
Modified:
trunk/
trunk/refman-4.1/client-utility-programs.xml
trunk/refman-5.0/client-utility-programs.xml
trunk/refman-5.1/client-utility-programs.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6456
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2335
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6457
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2335
Modified: trunk/refman-4.1/client-utility-programs.xml
===================================================================
--- trunk/refman-4.1/client-utility-programs.xml 2006-01-19 21:17:39 UTC (rev 935)
+++ trunk/refman-4.1/client-utility-programs.xml 2006-01-19 21:17:55 UTC (rev 936)
@@ -1475,6 +1475,10 @@
<primary>SQL scripts</primary>
</indexterm>
+ <indexterm>
+ <primary>batch SQL files</primary>
+ </indexterm>
+
<refmeta>
<refentrytitle><command>mysql</command></refentrytitle>
@@ -1508,7 +1512,7 @@
query results are presented in an ASCII-table format. When
used non-interactively (for example, as a filter), the result
is presented in tab-separated format. The output format can be
- changed using command-line options.
+ changed using command options.
</para>
<para>
@@ -1517,9 +1521,10 @@
forces <command>mysql</command> to retrieve results from the
server a row at a time rather than retrieving the entire
result set and buffering it in memory before displaying it.
- This is done by using <literal>mysql_use_result()</literal>
- rather than <literal>mysql_store_result()</literal> to
- retrieve the result set.
+ This is done by returning the result set using the
+ <literal>mysql_use_result()</literal> C API function in the
+ client/server library rather than
+ <literal>mysql_store_result()</literal>.
</para>
<para>
@@ -1546,7 +1551,8 @@
</para>
<para>
- You can run a script simply like this:
+ You can execute SQL statements in a script file (batch file)
+ like this:
</para>
<programlisting>
@@ -1813,8 +1819,8 @@
<para>
Enable or disable <literal>LOCAL</literal> capability for
<literal>LOAD DATA INFILE</literal>. With no value, the
- option enables <literal>LOCAL</literal>. It may be given
- as <option>--local-infile=0</option> or
+ option enables <literal>LOCAL</literal>. The option may be
+ given as <option>--local-infile=0</option> or
<option>--local-infile=1</option> to explicitly disable or
enable <literal>LOCAL</literal>. Enabling
<literal>LOCAL</literal> has no effect if the server does
@@ -1833,10 +1839,11 @@
</para>
<para>
- Named commands are <emphasis>enabled</emphasis>. Long
- format commands are allowed as well as shortened \*
+ Enable named <command>mysql</command> commands.
+ Long-format commands are allowed, not just short-format
commands. For example, <literal>quit</literal> and
- <literal>\q</literal> both are recognized.
+ <literal>\q</literal> both are recognized. See
+ <xref linkend="mysql-commands"/>.
</para>
</listitem>
@@ -1884,14 +1891,14 @@
</para>
<para>
- Named commands are disabled. Use the <literal>\*</literal>
- form only, or use named commands only at the beginning of
- a line ending with a semicolon
+ Disable named commands. Use the <literal>\*</literal> form
+ only, or use named commands only at the beginning of a
+ line ending with a semicolon
(‘<literal>;</literal>’). As of MySQL 3.23.22,
<command>mysql</command> starts with this option
<emphasis>enabled</emphasis> by default. However, even
with this option, long-format commands still work from the
- first line.
+ first line. See <xref linkend="mysql-commands"/>.
</para>
</listitem>
@@ -1906,9 +1913,9 @@
</para>
<para>
- Do not use a pager for displaying query output. Output
- paging is discussed further in
- <xref linkend="mysql-commands"/>.
+ Do not use a pager for displaying query output.
+ <xref linkend="mysql-commands"/>, discusses output paging
+ further.
</para>
</listitem>
@@ -1923,8 +1930,9 @@
</para>
<para>
- Do not copy output to a file. Tee files are discussed
- further in <xref linkend="mysql-commands"/>.
+ Do not copy output to a file.
+ <xref linkend="mysql-commands"/>, discusses tee files
+ further.
</para>
</listitem>
@@ -1962,8 +1970,9 @@
pagers are <command>less</command>,
<command>more</command>, <command>cat [>
filename]</command>, and so forth. This option works only
- on Unix. It does not work in batch mode. Output paging is
- discussed further in <xref linkend="mysql-commands"/>.
+ on Unix. It does not work in batch mode.
+ <xref linkend="mysql-commands"/>, discusses output paging
+ further.
</para>
</listitem>
@@ -2110,9 +2119,9 @@
<para>
Allow only those <literal>UPDATE</literal> and
- <literal>DELETE</literal> statements that specify rows to
- affect using key values. If you have set this option in an
- option file, you can override it by using
+ <literal>DELETE</literal> statements that specify which
+ rows to modify by using key values. If you have set this
+ option in an option file, you can override it by using
<option>--safe-updates</option> on the command line. See
<xref linkend="mysql-tips"/>, for more information about
this option.
@@ -2248,8 +2257,9 @@
<para>
Append a copy of output to the given file. This option
- does not work in batch mode. Tee files are discussed
- further in <xref linkend="mysql-commands"/>.
+ does not work in batch mode. in
+ <xref linkend="mysql-commands"/>, discusses tee files
+ further.
</para>
</listitem>
@@ -2298,7 +2308,7 @@
Verbose mode. Produce more output about what the program
does. This option can be given multiple times to produce
more and more output. (For example, <option>-v -v
- -v</option> produces the table output format even in batch
+ -v</option> produces table output format even in batch
mode.)
</para>
</listitem>
@@ -2329,9 +2339,10 @@
</para>
<para>
- Print the rows of query output vertically. Without this
- option, you can specify vertical output for individual
- statements by terminating them with <literal>\G</literal>.
+ Print query output rows vertically (one line per coluumn
+ value). Without this option, you can specify vertical
+ output for individual statements by terminating them with
+ <literal>\G</literal>.
</para>
</listitem>
@@ -2553,10 +2564,10 @@
</remark>
<para>
- <command>mysql</command> sends SQL statements that you issue
- to the server to be executed. There is also a set of commands
- that <command>mysql</command> itself interprets. For a list of
- these commands, type <literal>help</literal> or
+ <command>mysql</command> sends each SQL statement that you
+ issue to the server to be executed. There is also a set of
+ commands that <command>mysql</command> itself interprets. For
+ a list of these commands, type <literal>help</literal> or
<literal>\h</literal> at the <literal>mysql></literal>
prompt:
</para>
@@ -2577,7 +2588,8 @@
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
-delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.
+delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as
+ new delimiter.
edit (\e) Edit command with $EDITOR.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
@@ -2593,7 +2605,8 @@
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
system (\!) Execute a system shell command.
-tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
+tee (\T) Set outfile [to_outfile]. Append everything into given
+ outfile.
use (\u) Use another database. Takes database name as argument.
warnings (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.
@@ -2647,10 +2660,10 @@
</para>
<para>
- Browsing or searching query results in interactive mode by
- using Unix programs such as <command>less</command>,
- <command>more</command>, or any other similar program is
- possible with the <option>--pager</option> option. If you
+ By using the <option>--pager</option> option, it is possible
+ to browse or search query results in interactive mode with
+ Unix programs such as <command>less</command>,
+ <command>more</command>, or any other similar program. If you
specify no value for the option, <command>mysql</command>
checks the value of the <literal>PAGER</literal> environment
variable and sets the pager to that. Output paging can be
@@ -2672,7 +2685,8 @@
</para>
<para>
- A few tips about the <command>pager</command> command:
+ Here are a few tips about the <command>pager</command>
+ command:
</para>
<itemizedlist>
@@ -2913,14 +2927,11 @@
<listitem>
<para>
- Use an environment variable
+ <emphasis>Use an environment variable.</emphasis> You can
+ set the <literal>MYSQL_PS1</literal> environment variable
+ to a prompt string. For example:
</para>
- <para>
- You can set the <literal>MYSQL_PS1</literal> environment
- variable to a prompt string. For example:
- </para>
-
<programlisting>
shell> <userinput>export MYSQL_PS1="(\u@\h) [\d]> "</userinput>
</programlisting>
@@ -2928,11 +2939,21 @@
<listitem>
<para>
- Use an option file
+ <emphasis>Use a command-line option.</emphasis> You can
+ set the <option>--prompt</option> option on the command
+ line to <command>mysql</command>. For example:
</para>
+<programlisting>
+shell> <userinput>mysql --prompt="(\u@\h) [\d]> "</userinput>
+(user@host) [database]>
+</programlisting>
+ </listitem>
+
+ <listitem>
<para>
- You can set the <literal>prompt</literal> option in the
+ <emphasis>Use an option file.</emphasis> You can set the
+ <literal>prompt</literal> option in the
<literal>[mysql]</literal> group of any MySQL option file,
such as <filename>/etc/my.cnf</filename> or the
<filename>.my.cnf</filename> file in your home directory.
@@ -2969,27 +2990,8 @@
<listitem>
<para>
- Use a command-line option
- </para>
-
- <para>
- You can set the <option>--prompt</option> option on the
- command line to <command>mysql</command>. For example:
- </para>
-
-<programlisting>
-shell> <userinput>mysql --prompt="(\u@\h) [\d]> "</userinput>
-(user@host) [database]>
-</programlisting>
- </listitem>
-
- <listitem>
- <para>
- Interactively
- </para>
-
- <para>
- You can change your prompt interactively by using the
+ <emphasis>Set the prompt interactively.</emphasis> You can
+ change your prompt interactively by using the
<literal>prompt</literal> (or <literal>\R</literal>)
command. For example:
</para>
@@ -3025,9 +3027,9 @@
However, it is also possible to put your SQL statements in a
file and then tell <command>mysql</command> to read its input
from that file. To do so, create a text file
- <filename>text_file</filename> that contains the statements
- you wish to execute. Then invoke <command>mysql</command> as
- shown here:
+ <replaceable>text_file</replaceable> that contains the
+ statements you wish to execute. Then invoke
+ <command>mysql</command> as shown here:
</para>
<programlisting>
@@ -3035,10 +3037,10 @@
</programlisting>
<para>
- You can also start your text file with a <literal>USE
- <replaceable>db_name</replaceable></literal> statement. In
- this case, it is unnecessary to specify the database name on
- the command line:
+ If you place a <literal>USE
+ <replaceable>db_name</replaceable></literal> statement as the
+ first statement in the file, it is unnecessary to specify the
+ database name on the command line:
</para>
<programlisting>
@@ -3046,9 +3048,9 @@
</programlisting>
<para>
- If you are running <command>mysql</command>, you can execute
- an SQL script file using the <literal>source</literal> or
- <literal>\.</literal> command:
+ If you are already running <command>mysql</command>, you can
+ execute an SQL script file using the <literal>source</literal>
+ or <literal>\.</literal> command:
</para>
<programlisting>
@@ -3058,8 +3060,8 @@
<para>
Sometimes you may want your script to display progress
- information to the user; for this you can insert some lines
- like
+ information to the user. For this you can insert statements
+ like this:
</para>
<programlisting>
@@ -3067,7 +3069,8 @@
</programlisting>
<para>
- which outputs <info_to_display>.
+ The statement shown outputs
+ <literal><info_to_display></literal>.
</para>
<para>
@@ -3187,25 +3190,25 @@
<listitem>
<para>
- All large <literal>SELECT</literal> results are
- automatically limited to 1,000 rows unless the statement
- includes a <literal>LIMIT</literal> clause.
+ The server limits all large <literal>SELECT</literal>
+ results to 1,000 rows unless the statement includes a
+ <literal>LIMIT</literal> clause.
</para>
</listitem>
<listitem>
<para>
- Multiple-table <literal>SELECT</literal> statements that
- probably need to examine more than 1,000,000 row
- combinations are aborted.
+ The server aborts multiple-table
+ <literal>SELECT</literal> statements that probably need
+ to examine more than 1,000,000 row combinations.
</para>
</listitem>
</itemizedlist>
<para>
- To specify limits other than 1,000 and 1,000,000, you can
- override the defaults by using
+ To specify limits different from 1,000 and 1,000,000, you
+ can override the defaults by using the
<option>--select_limit</option> and
<option>--max_join_size</option> options:
</para>
@@ -3227,10 +3230,11 @@
the query again. However, even if <command>mysql</command>
succeeds in reconnecting, your first connection has ended
and all your previous session objects and settings are lost:
- temporary tables, the autocommit mode, and user and session
- variables. This behavior may be dangerous for you, as in the
- following example where the server was shut down and
- restarted without you knowing it:
+ temporary tables, the autocommit mode, and user-defined and
+ session variables. Also, any current transaction rolls back.
+ This behavior may be dangerous for you, as in the following
+ example where the server was shut down and restarted without
+ you knowing it:
</para>
<programlisting>
@@ -3558,7 +3562,7 @@
</para>
<para>
- The hostname to use in the access privileges.
+ The username to use in the access privileges.
</para>
</listitem>
@@ -3648,7 +3652,7 @@
<para>
<command>mysqladmin</command> is a client for performing
administrative operations. You can use it to check the
- server's configuration and current status, create and drop
+ server's configuration and current status, to create and drop
databases, and more.
</para>
@@ -3657,11 +3661,13 @@
</para>
<programlisting>
-shell> <userinput>mysqladmin [<replaceable>options</replaceable>] <replaceable>command</replaceable> [<replaceable>command-options</replaceable>] [<replaceable>command</replaceable> [<replaceable>command-options</replaceable>]] ...</userinput>
+shell> <userinput>mysqladmin [<replaceable>options</replaceable>] <replaceable>command</replaceable> [<replaceable>command-arg</replaceable>] [<replaceable>command</replaceable> [<replaceable>command-arg</replaceable>]] ...</userinput>
</programlisting>
<para>
- <command>mysqladmin</command> supports the following commands:
+ <command>mysqladmin</command> supports the commands described
+ in the following list. Some of the commands take an argument
+ following the command name.
</para>
<itemizedlist>
@@ -3773,11 +3779,13 @@
<listitem>
<para>
- <literal>kill id,id,...</literal>
+ <literal>kill
+ <replaceable>id</replaceable>,<replaceable>id</replaceable>,...</literal>
</para>
<para>
- Kill server threads.
+ Kill server threads. If multiple thread ID values are
+ given, there must be no spaces in the list.
</para>
</listitem>
@@ -3803,24 +3811,27 @@
<para>
Set a new password. This changes the password to
- <literal>new-password</literal> for the account that you
- use with <command>mysqladmin</command> for connecting to
- the server.
+ <replaceable>new-password</replaceable> for the account
+ that you use with <command>mysqladmin</command> for
+ connecting to the server. Thus, the next time you invoke
+ <command>mysqladmin</command> (or any other client
+ program) using the same account, you will need to specify
+ the new password.
</para>
<para>
- If <replaceable>new-password</replaceable> contains spaces
- or other characters that are special to your command
- interpreter, you need to enclose it within quotes. On
- Windows, be sure to use double quotes rather than single
- quotes; single quotes are not stripped from the password,
- but rather are interpreted as part of the password. For
- example:
+ If the <replaceable>new-password</replaceable> value
+ contains spaces or other characters that are special to
+ your command interpreter, you need to enclose it within
+ quotes. On Windows, be sure to use double quotes rather
+ than single quotes; single quotes are not stripped from
+ the password, but rather are interpreted as part of the
+ password. For example:
</para>
- <para>
- shell> mysqladmin password "my new password"
- </para>
+<programlisting>
+shell> <userinput>mysqladmin password "my new password"</userinput>
+</programlisting>
</listitem>
<listitem>
@@ -3834,7 +3845,7 @@
running, 1 if it is not. Beginning with MySQL 4.0.22, the
status is 0 even in case of an error such as
<literal>Access denied</literal>, because that means the
- server is running but disallowed the connection, which is
+ server is running but refused the connection, which is
different from the server not running.
</para>
</listitem>
@@ -4054,7 +4065,7 @@
</para>
<para>
- The number of <literal>flush ...</literal>,
+ The number of <literal>flush-*</literal>,
<literal>refresh</literal>, and <literal>reload</literal>
commands the server has executed.
</para>
@@ -4085,8 +4096,8 @@
<para>
The amount of memory allocated directly by
- <command>mysqld</command> code. This value is displayed
- only when MySQL has been compiled with
+ <command>mysqld</command>. This value is displayed only
+ when MySQL has been compiled with
<option>--with-debug=full</option>.
</para>
</listitem>
@@ -4102,8 +4113,8 @@
<para>
The maximum amount of memory allocated directly by
- <command>mysqld</command> code. This value is displayed
- only when MySQL has been compiled with
+ <command>mysqld</command>. This value is displayed only
+ when MySQL has been compiled with
<option>--with-debug=full</option>.
</para>
</listitem>
@@ -4183,8 +4194,9 @@
</para>
<para>
- The number of iterations to make. This works only with
- <option>--sleep</option> (<option>-i</option>).
+ The number of iterations to make for repeated command
+ execution. This works only with the
+ <option>--sleep</option> option.
</para>
</listitem>
@@ -4223,8 +4235,8 @@
<para>
Do not ask for confirmation for the <literal>drop
- database</literal> command. With multiple commands,
- continue even if an error occurs.
+ <replaceable>db_name</replaceable></literal> command. With
+ multiple commands, continue even if an error occurs.
</para>
</listitem>
@@ -4290,8 +4302,8 @@
<para>
Show the difference between the current and previous
- values when used with <option>-i</option>. Currently, this
- option works only with the
+ values when used with the <option>--sleep</option> option.
+ Currently, this option works only with the
<literal>extended-status</literal> command.
</para>
</listitem>
@@ -4314,8 +4326,10 @@
</para>
<para>
- Execute commands again and again, sleeping for
- <replaceable>delay</replaceable> seconds in between.
+ Execute commands repeatedly, sleeping for
+ <replaceable>delay</replaceable> seconds in between. The
+ <option>--count</option> option determines the number of
+ iterations.
</para>
</listitem>
@@ -4383,9 +4397,9 @@
<para>
If the connection cannot be established, wait and retry
- instead of aborting. If an option value is given, it
- indicates the number of times to retry. The default is one
- time.
+ instead of aborting. If a <replaceable>count</replaceable>
+ value is given, it indicates the number of times to retry.
+ The default is one time.
</para>
</listitem>
@@ -4434,8 +4448,8 @@
</para>
<para>
- The maximum number of seconds to wait for shutdown. The
- default value is 3600 (1 hour).
+ The maximum number of seconds to wait for server shutdown.
+ The default value is 3600 (1 hour).
</para>
</listitem>
@@ -4483,7 +4497,7 @@
<refsynopsisdiv>
<cmdsynopsis>
- <command>mysqlbinlog [<literal>options</literal>] <replaceable>log-file</replaceable> …</command>
+ <command>mysqlbinlog [<literal>options</literal>] <replaceable>log_file</replaceable> …</command>
</cmdsynopsis>
</refsynopsisdiv>
@@ -4503,12 +4517,12 @@
</para>
<programlisting>
-shell> <userinput>mysqlbinlog [<replaceable>options</replaceable>] <replaceable>log-file</replaceable> ...</userinput>
+shell> <userinput>mysqlbinlog [<replaceable>options</replaceable>] <replaceable>log_file</replaceable> ...</userinput>
</programlisting>
<para>
- For example, to display the contents of the binary log
- <filename>binlog.000003</filename>, use this command:
+ For example, to display the contents of the binary log file
+ named <filename>binlog.000003</filename>, use this command:
</para>
<programlisting>
@@ -4516,11 +4530,11 @@
</programlisting>
<para>
- The output includes all statements contained in
- <filename>binlog.000003</filename>, together with other
- information such as the time each statement took, the thread
- ID of the client that issued it, the timestamp when it was
- issued, and so forth.
+ The output includes all events contained in
+ <filename>binlog.000003</filename>. Event information includes
+ the statement executed, the time the statement took, the
+ thread ID of the client that issued it, the timestamp when it
+ was issued, and so forth.
</para>
<para>
@@ -4549,8 +4563,8 @@
</para>
<para>
- The binary log is discussed further in
- <xref linkend="binary-log"/>.
+ <xref linkend="binary-log"/>, discusses the binary log
+ further.
</para>
<para>
@@ -5928,6 +5942,8 @@
Write a debugging log. The
<replaceable>debug_options</replaceable> string is often
<literal>'d:t:o,<replaceable>file_name</replaceable>'</literal>.
+ The default is
+ <literal>'d:t:o,/tmp/mysqldump.trace'</literal>.
</para>
</listitem>
Modified: trunk/refman-5.0/client-utility-programs.xml
===================================================================
--- trunk/refman-5.0/client-utility-programs.xml 2006-01-19 21:17:39 UTC (rev 935)
+++ trunk/refman-5.0/client-utility-programs.xml 2006-01-19 21:17:55 UTC (rev 936)
@@ -1413,6 +1413,10 @@
<primary>SQL scripts</primary>
</indexterm>
+ <indexterm>
+ <primary>batch SQL files</primary>
+ </indexterm>
+
<refmeta>
<refentrytitle><command>mysql</command></refentrytitle>
@@ -1446,7 +1450,7 @@
query results are presented in an ASCII-table format. When
used non-interactively (for example, as a filter), the result
is presented in tab-separated format. The output format can be
- changed using command-line options.
+ changed using command options.
</para>
<para>
@@ -1455,9 +1459,10 @@
forces <command>mysql</command> to retrieve results from the
server a row at a time rather than retrieving the entire
result set and buffering it in memory before displaying it.
- This is done by using <literal>mysql_use_result()</literal>
- rather than <literal>mysql_store_result()</literal> to
- retrieve the result set.
+ This is done by returning the result set using the
+ <literal>mysql_use_result()</literal> C API function in the
+ client/server library rather than
+ <literal>mysql_store_result()</literal>.
</para>
<para>
@@ -1484,7 +1489,8 @@
</para>
<para>
- You can run a script simply like this:
+ You can execute SQL statements in a script file (batch file)
+ like this:
</para>
<programlisting>
@@ -1751,8 +1757,8 @@
<para>
Enable or disable <literal>LOCAL</literal> capability for
<literal>LOAD DATA INFILE</literal>. With no value, the
- option enables <literal>LOCAL</literal>. It may be given
- as <option>--local-infile=0</option> or
+ option enables <literal>LOCAL</literal>. The option may be
+ given as <option>--local-infile=0</option> or
<option>--local-infile=1</option> to explicitly disable or
enable <literal>LOCAL</literal>. Enabling
<literal>LOCAL</literal> has no effect if the server does
@@ -1771,10 +1777,11 @@
</para>
<para>
- Named commands are <emphasis>enabled</emphasis>. Long
- format commands are allowed as well as shortened \*
+ Enable named <command>mysql</command> commands.
+ Long-format commands are allowed, not just short-format
commands. For example, <literal>quit</literal> and
- <literal>\q</literal> both are recognized.
+ <literal>\q</literal> both are recognized. See
+ <xref linkend="mysql-commands"/>.
</para>
</listitem>
@@ -1822,14 +1829,14 @@
</para>
<para>
- Named commands are disabled. Use the <literal>\*</literal>
- form only, or use named commands only at the beginning of
- a line ending with a semicolon
- (‘<literal>;</literal>’). As of MySQL 3.23.22,
+ Disable named commands. Use the <literal>\*</literal> form
+ only, or use named commands only at the beginning of a
+ line ending with a semicolon
+ (‘<literal>;</literal>’).
<command>mysql</command> starts with this option
<emphasis>enabled</emphasis> by default. However, even
with this option, long-format commands still work from the
- first line.
+ first line. See <xref linkend="mysql-commands"/>.
</para>
</listitem>
@@ -1844,9 +1851,9 @@
</para>
<para>
- Do not use a pager for displaying query output. Output
- paging is discussed further in
- <xref linkend="mysql-commands"/>.
+ Do not use a pager for displaying query output.
+ <xref linkend="mysql-commands"/>, discusses output paging
+ further.
</para>
</listitem>
@@ -1861,8 +1868,9 @@
</para>
<para>
- Do not copy output to a file. Tee files are discussed
- further in <xref linkend="mysql-commands"/>.
+ Do not copy output to a file.
+ <xref linkend="mysql-commands"/>, discusses tee files
+ further.
</para>
</listitem>
@@ -1900,8 +1908,9 @@
pagers are <command>less</command>,
<command>more</command>, <command>cat [>
filename]</command>, and so forth. This option works only
- on Unix. It does not work in batch mode. Output paging is
- discussed further in <xref linkend="mysql-commands"/>.
+ on Unix. It does not work in batch mode.
+ <xref linkend="mysql-commands"/>, discusses output paging
+ further.
</para>
</listitem>
@@ -2047,9 +2056,9 @@
<para>
Allow only those <literal>UPDATE</literal> and
- <literal>DELETE</literal> statements that specify rows to
- affect using key values. If you have set this option in an
- option file, you can override it by using
+ <literal>DELETE</literal> statements that specify which
+ rows to modify by using key values. If you have set this
+ option in an option file, you can override it by using
<option>--safe-updates</option> on the command line. See
<xref linkend="mysql-tips"/>, for more information about
this option.
@@ -2200,8 +2209,9 @@
<para>
Append a copy of output to the given file. This option
- does not work in batch mode. Tee files are discussed
- further in <xref linkend="mysql-commands"/>.
+ does not work in batch mode. in
+ <xref linkend="mysql-commands"/>, discusses tee files
+ further.
</para>
</listitem>
@@ -2250,7 +2260,7 @@
Verbose mode. Produce more output about what the program
does. This option can be given multiple times to produce
more and more output. (For example, <option>-v -v
- -v</option> produces the table output format even in batch
+ -v</option> produces table output format even in batch
mode.)
</para>
</listitem>
@@ -2281,9 +2291,10 @@
</para>
<para>
- Print the rows of query output vertically. Without this
- option, you can specify vertical output for individual
- statements by terminating them with <literal>\G</literal>.
+ Print query output rows vertically (one line per coluumn
+ value). Without this option, you can specify vertical
+ output for individual statements by terminating them with
+ <literal>\G</literal>.
</para>
</listitem>
@@ -2505,10 +2516,10 @@
</remark>
<para>
- <command>mysql</command> sends SQL statements that you issue
- to the server to be executed. There is also a set of commands
- that <command>mysql</command> itself interprets. For a list of
- these commands, type <literal>help</literal> or
+ <command>mysql</command> sends each SQL statement that you
+ issue to the server to be executed. There is also a set of
+ commands that <command>mysql</command> itself interprets. For
+ a list of these commands, type <literal>help</literal> or
<literal>\h</literal> at the <literal>mysql></literal>
prompt:
</para>
@@ -2530,7 +2541,8 @@
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
-delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.
+delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as
+ new delimiter.
edit (\e) Edit command with $EDITOR.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
@@ -2546,7 +2558,8 @@
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
system (\!) Execute a system shell command.
-tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
+tee (\T) Set outfile [to_outfile]. Append everything into given
+ outfile.
use (\u) Use another database. Takes database name as argument.
warnings (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.
@@ -2600,10 +2613,10 @@
</para>
<para>
- Browsing or searching query results in interactive mode by
- using Unix programs such as <command>less</command>,
- <command>more</command>, or any other similar program is
- possible with the <option>--pager</option> option. If you
+ By using the <option>--pager</option> option, it is possible
+ to browse or search query results in interactive mode with
+ Unix programs such as <command>less</command>,
+ <command>more</command>, or any other similar program. If you
specify no value for the option, <command>mysql</command>
checks the value of the <literal>PAGER</literal> environment
variable and sets the pager to that. Output paging can be
@@ -2625,7 +2638,8 @@
</para>
<para>
- A few tips about the <command>pager</command> command:
+ Here are a few tips about the <command>pager</command>
+ command:
</para>
<itemizedlist>
@@ -2866,14 +2880,11 @@
<listitem>
<para>
- Use an environment variable
+ <emphasis>Use an environment variable.</emphasis> You can
+ set the <literal>MYSQL_PS1</literal> environment variable
+ to a prompt string. For example:
</para>
- <para>
- You can set the <literal>MYSQL_PS1</literal> environment
- variable to a prompt string. For example:
- </para>
-
<programlisting>
shell> <userinput>export MYSQL_PS1="(\u@\h) [\d]> "</userinput>
</programlisting>
@@ -2881,11 +2892,21 @@
<listitem>
<para>
- Use an option file
+ <emphasis>Use a command-line option.</emphasis> You can
+ set the <option>--prompt</option> option on the command
+ line to <command>mysql</command>. For example:
</para>
+<programlisting>
+shell> <userinput>mysql --prompt="(\u@\h) [\d]> "</userinput>
+(user@host) [database]>
+</programlisting>
+ </listitem>
+
+ <listitem>
<para>
- You can set the <literal>prompt</literal> option in the
+ <emphasis>Use an option file.</emphasis> You can set the
+ <literal>prompt</literal> option in the
<literal>[mysql]</literal> group of any MySQL option file,
such as <filename>/etc/my.cnf</filename> or the
<filename>.my.cnf</filename> file in your home directory.
@@ -2922,27 +2943,8 @@
<listitem>
<para>
- Use a command-line option
- </para>
-
- <para>
- You can set the <option>--prompt</option> option on the
- command line to <command>mysql</command>. For example:
- </para>
-
-<programlisting>
-shell> <userinput>mysql --prompt="(\u@\h) [\d]> "</userinput>
-(user@host) [database]>
-</programlisting>
- </listitem>
-
- <listitem>
- <para>
- Interactively
- </para>
-
- <para>
- You can change your prompt interactively by using the
+ <emphasis>Set the prompt interactively.</emphasis> You can
+ change your prompt interactively by using the
<literal>prompt</literal> (or <literal>\R</literal>)
command. For example:
</para>
@@ -2978,9 +2980,9 @@
However, it is also possible to put your SQL statements in a
file and then tell <command>mysql</command> to read its input
from that file. To do so, create a text file
- <filename>text_file</filename> that contains the statements
- you wish to execute. Then invoke <command>mysql</command> as
- shown here:
+ <replaceable>text_file</replaceable> that contains the
+ statements you wish to execute. Then invoke
+ <command>mysql</command> as shown here:
</para>
<programlisting>
@@ -2988,10 +2990,10 @@
</programlisting>
<para>
- You can also start your text file with a <literal>USE
- <replaceable>db_name</replaceable></literal> statement. In
- this case, it is unnecessary to specify the database name on
- the command line:
+ If you place a <literal>USE
+ <replaceable>db_name</replaceable></literal> statement as the
+ first statement in the file, it is unnecessary to specify the
+ database name on the command line:
</para>
<programlisting>
@@ -2999,9 +3001,9 @@
</programlisting>
<para>
- If you are running <command>mysql</command>, you can execute
- an SQL script file using the <literal>source</literal> or
- <literal>\.</literal> command:
+ If you are already running <command>mysql</command>, you can
+ execute an SQL script file using the <literal>source</literal>
+ or <literal>\.</literal> command:
</para>
<programlisting>
@@ -3011,8 +3013,8 @@
<para>
Sometimes you may want your script to display progress
- information to the user; for this you can insert some lines
- like
+ information to the user. For this you can insert statements
+ like this:
</para>
<programlisting>
@@ -3020,7 +3022,8 @@
</programlisting>
<para>
- which outputs <info_to_display>.
+ The statement shown outputs
+ <literal><info_to_display></literal>.
</para>
<para>
@@ -3140,25 +3143,25 @@
<listitem>
<para>
- All large <literal>SELECT</literal> results are
- automatically limited to 1,000 rows unless the statement
- includes a <literal>LIMIT</literal> clause.
+ The server limits all large <literal>SELECT</literal>
+ results to 1,000 rows unless the statement includes a
+ <literal>LIMIT</literal> clause.
</para>
</listitem>
<listitem>
<para>
- Multiple-table <literal>SELECT</literal> statements that
- probably need to examine more than 1,000,000 row
- combinations are aborted.
+ The server aborts multiple-table
+ <literal>SELECT</literal> statements that probably need
+ to examine more than 1,000,000 row combinations.
</para>
</listitem>
</itemizedlist>
<para>
- To specify limits other than 1,000 and 1,000,000, you can
- override the defaults by using
+ To specify limits different from 1,000 and 1,000,000, you
+ can override the defaults by using the
<option>--select_limit</option> and
<option>--max_join_size</option> options:
</para>
@@ -3180,10 +3183,11 @@
the query again. However, even if <command>mysql</command>
succeeds in reconnecting, your first connection has ended
and all your previous session objects and settings are lost:
- temporary tables, the autocommit mode, and user and session
- variables. This behavior may be dangerous for you, as in the
- following example where the server was shut down and
- restarted without you knowing it:
+ temporary tables, the autocommit mode, and user-defined and
+ session variables. Also, any current transaction rolls back.
+ This behavior may be dangerous for you, as in the following
+ example where the server was shut down and restarted without
+ you knowing it:
</para>
<programlisting>
@@ -3511,7 +3515,7 @@
</para>
<para>
- The hostname to use in the access privileges.
+ The username to use in the access privileges.
</para>
</listitem>
@@ -3601,7 +3605,7 @@
<para>
<command>mysqladmin</command> is a client for performing
administrative operations. You can use it to check the
- server's configuration and current status, create and drop
+ server's configuration and current status, to create and drop
databases, and more.
</para>
@@ -3610,11 +3614,13 @@
</para>
<programlisting>
-shell> <userinput>mysqladmin [<replaceable>options</replaceable>] <replaceable>command</replaceable> [<replaceable>command-options</replaceable>] [<replaceable>command</replaceable> [<replaceable>command-options</replaceable>]] ...</userinput>
+shell> <userinput>mysqladmin [<replaceable>options</replaceable>] <replaceable>command</replaceable> [<replaceable>command-arg</replaceable>] [<replaceable>command</replaceable> [<replaceable>command-arg</replaceable>]] ...</userinput>
</programlisting>
<para>
- <command>mysqladmin</command> supports the following commands:
+ <command>mysqladmin</command> supports the commands described
+ in the following list. Some of the commands take an argument
+ following the command name.
</para>
<itemizedlist>
@@ -3726,11 +3732,13 @@
<listitem>
<para>
- <literal>kill id,id,...</literal>
+ <literal>kill
+ <replaceable>id</replaceable>,<replaceable>id</replaceable>,...</literal>
</para>
<para>
- Kill server threads.
+ Kill server threads. If multiple thread ID values are
+ given, there must be no spaces in the list.
</para>
</listitem>
@@ -3756,24 +3764,27 @@
<para>
Set a new password. This changes the password to
- <literal>new-password</literal> for the account that you
- use with <command>mysqladmin</command> for connecting to
- the server.
+ <replaceable>new-password</replaceable> for the account
+ that you use with <command>mysqladmin</command> for
+ connecting to the server. Thus, the next time you invoke
+ <command>mysqladmin</command> (or any other client
+ program) using the same account, you will need to specify
+ the new password.
</para>
<para>
- If <replaceable>new-password</replaceable> contains spaces
- or other characters that are special to your command
- interpreter, you need to enclose it within quotes. On
- Windows, be sure to use double quotes rather than single
- quotes; single quotes are not stripped from the password,
- but rather are interpreted as part of the password. For
- example:
+ If the <replaceable>new-password</replaceable> value
+ contains spaces or other characters that are special to
+ your command interpreter, you need to enclose it within
+ quotes. On Windows, be sure to use double quotes rather
+ than single quotes; single quotes are not stripped from
+ the password, but rather are interpreted as part of the
+ password. For example:
</para>
- <para>
- shell> mysqladmin password "my new password"
- </para>
+<programlisting>
+shell> <userinput>mysqladmin password "my new password"</userinput>
+</programlisting>
</listitem>
<listitem>
@@ -3787,7 +3798,7 @@
running, 1 if it is not. This is 0 even in case of an
error such as <literal>Access denied</literal>, because
this means that the server is running but refused the
- connection, which is not the same as the server not
+ connection, which is different from the server not
running.
</para>
</listitem>
@@ -4006,7 +4017,7 @@
</para>
<para>
- The number of <literal>flush ...</literal>,
+ The number of <literal>flush-*</literal>,
<literal>refresh</literal>, and <literal>reload</literal>
commands the server has executed.
</para>
@@ -4037,8 +4048,8 @@
<para>
The amount of memory allocated directly by
- <command>mysqld</command> code. This value is displayed
- only when MySQL has been compiled with
+ <command>mysqld</command>. This value is displayed only
+ when MySQL has been compiled with
<option>--with-debug=full</option>.
</para>
</listitem>
@@ -4054,8 +4065,8 @@
<para>
The maximum amount of memory allocated directly by
- <command>mysqld</command> code. This value is displayed
- only when MySQL has been compiled with
+ <command>mysqld</command>. This value is displayed only
+ when MySQL has been compiled with
<option>--with-debug=full</option>.
</para>
</listitem>
@@ -4135,8 +4146,9 @@
</para>
<para>
- The number of iterations to make. This works only with
- <option>--sleep</option> (<option>-i</option>).
+ The number of iterations to make for repeated command
+ execution. This works only with the
+ <option>--sleep</option> option.
</para>
</listitem>
@@ -4174,8 +4186,8 @@
<para>
Do not ask for confirmation for the <literal>drop
- database</literal> command. With multiple commands,
- continue even if an error occurs.
+ <replaceable>db_name</replaceable></literal> command. With
+ multiple commands, continue even if an error occurs.
</para>
</listitem>
@@ -4241,8 +4253,8 @@
<para>
Show the difference between the current and previous
- values when used with <option>-i</option>. Currently, this
- option works only with the
+ values when used with the <option>--sleep</option> option.
+ Currently, this option works only with the
<literal>extended-status</literal> command.
</para>
</listitem>
@@ -4265,8 +4277,10 @@
</para>
<para>
- Execute commands again and again, sleeping for
- <replaceable>delay</replaceable> seconds in between.
+ Execute commands repeatedly, sleeping for
+ <replaceable>delay</replaceable> seconds in between. The
+ <option>--count</option> option determines the number of
+ iterations.
</para>
</listitem>
@@ -4334,9 +4348,9 @@
<para>
If the connection cannot be established, wait and retry
- instead of aborting. If an option value is given, it
- indicates the number of times to retry. The default is one
- time.
+ instead of aborting. If a <replaceable>count</replaceable>
+ value is given, it indicates the number of times to retry.
+ The default is one time.
</para>
</listitem>
@@ -4385,8 +4399,8 @@
</para>
<para>
- The maximum number of seconds to wait for shutdown. The
- default value is 3600 (1 hour).
+ The maximum number of seconds to wait for server shutdown.
+ The default value is 3600 (1 hour).
</para>
</listitem>
@@ -4434,7 +4448,7 @@
<refsynopsisdiv>
<cmdsynopsis>
- <command>mysqlbinlog [<literal>options</literal>] <replaceable>log-file</replaceable> …</command>
+ <command>mysqlbinlog [<literal>options</literal>] <replaceable>log_file</replaceable> …</command>
</cmdsynopsis>
</refsynopsisdiv>
@@ -4453,12 +4467,12 @@
</para>
<programlisting>
-shell> <userinput>mysqlbinlog [<replaceable>options</replaceable>] <replaceable>log-file</replaceable> ...</userinput>
+shell> <userinput>mysqlbinlog [<replaceable>options</replaceable>] <replaceable>log_file</replaceable> ...</userinput>
</programlisting>
<para>
- For example, to display the contents of the binary log
- <filename>binlog.000003</filename>, use this command:
+ For example, to display the contents of the binary log file
+ named <filename>binlog.000003</filename>, use this command:
</para>
<programlisting>
@@ -4466,11 +4480,11 @@
</programlisting>
<para>
- The output includes all statements contained in
- <filename>binlog.000003</filename>, together with other
- information such as the time each statement took, the thread
- ID of the client that issued it, the timestamp when it was
- issued, and so forth.
+ The output includes all events contained in
+ <filename>binlog.000003</filename>. Event information includes
+ the statement executed, the time the statement took, the
+ thread ID of the client that issued it, the timestamp when it
+ was issued, and so forth.
</para>
<para>
@@ -4499,8 +4513,8 @@
</para>
<para>
- The binary log is discussed further in
- <xref linkend="binary-log"/>.
+ <xref linkend="binary-log"/>, discusses the binary log
+ further.
</para>
<para>
@@ -5986,6 +6000,8 @@
Write a debugging log. The
<replaceable>debug_options</replaceable> string is often
<literal>'d:t:o,<replaceable>file_name</replaceable>'</literal>.
+ The default is
+ <literal>'d:t:o,/tmp/mysqldump.trace'</literal>.
</para>
</listitem>
Modified: trunk/refman-5.1/client-utility-programs.xml
===================================================================
--- trunk/refman-5.1/client-utility-programs.xml 2006-01-19 21:17:39 UTC (rev 935)
+++ trunk/refman-5.1/client-utility-programs.xml 2006-01-19 21:17:55 UTC (rev 936)
@@ -1429,6 +1429,10 @@
<primary>SQL scripts</primary>
</indexterm>
+ <indexterm>
+ <primary>batch SQL files</primary>
+ </indexterm>
+
<refmeta>
<refentrytitle><command>mysql</command></refentrytitle>
@@ -1462,7 +1466,7 @@
query results are presented in an ASCII-table format. When
used non-interactively (for example, as a filter), the result
is presented in tab-separated format. The output format can be
- changed using command-line options.
+ changed using command options.
</para>
<para>
@@ -1471,9 +1475,10 @@
forces <command>mysql</command> to retrieve results from the
server a row at a time rather than retrieving the entire
result set and buffering it in memory before displaying it.
- This is done by using <literal>mysql_use_result()</literal>
- rather than <literal>mysql_store_result()</literal> to
- retrieve the result set.
+ This is done by returning the result set using the
+ <literal>mysql_use_result()</literal> C API function in the
+ client/server library rather than
+ <literal>mysql_store_result()</literal>.
</para>
<para>
@@ -1500,7 +1505,8 @@
</para>
<para>
- You can run a script simply like this:
+ You can execute SQL statements in a script file (batch file)
+ like this:
</para>
<programlisting>
@@ -1767,8 +1773,8 @@
<para>
Enable or disable <literal>LOCAL</literal> capability for
<literal>LOAD DATA INFILE</literal>. With no value, the
- option enables <literal>LOCAL</literal>. It may be given
- as <option>--local-infile=0</option> or
+ option enables <literal>LOCAL</literal>. The option may be
+ given as <option>--local-infile=0</option> or
<option>--local-infile=1</option> to explicitly disable or
enable <literal>LOCAL</literal>. Enabling
<literal>LOCAL</literal> has no effect if the server does
@@ -1787,10 +1793,11 @@
</para>
<para>
- Named commands are <emphasis>enabled</emphasis>. Long
- format commands are allowed as well as shortened \*
+ Enable named <command>mysql</command> commands.
+ Long-format commands are allowed, not just short-format
commands. For example, <literal>quit</literal> and
- <literal>\q</literal> both are recognized.
+ <literal>\q</literal> both are recognized. See
+ <xref linkend="mysql-commands"/>.
</para>
</listitem>
@@ -1838,14 +1845,14 @@
</para>
<para>
- Named commands are disabled. Use the <literal>\*</literal>
- form only, or use named commands only at the beginning of
- a line ending with a semicolon
- (‘<literal>;</literal>’). As of MySQL 3.23.22,
+ Disable named commands. Use the <literal>\*</literal> form
+ only, or use named commands only at the beginning of a
+ line ending with a semicolon
+ (‘<literal>;</literal>’).
<command>mysql</command> starts with this option
<emphasis>enabled</emphasis> by default. However, even
with this option, long-format commands still work from the
- first line.
+ first line. See <xref linkend="mysql-commands"/>.
</para>
</listitem>
@@ -1860,9 +1867,9 @@
</para>
<para>
- Do not use a pager for displaying query output. Output
- paging is discussed further in
- <xref linkend="mysql-commands"/>.
+ Do not use a pager for displaying query output.
+ <xref linkend="mysql-commands"/>, discusses output paging
+ further.
</para>
</listitem>
@@ -1877,8 +1884,9 @@
</para>
<para>
- Do not copy output to a file. Tee files are discussed
- further in <xref linkend="mysql-commands"/>.
+ Do not copy output to a file.
+ <xref linkend="mysql-commands"/>, discusses tee files
+ further.
</para>
</listitem>
@@ -1916,8 +1924,9 @@
pagers are <command>less</command>,
<command>more</command>, <command>cat [>
filename]</command>, and so forth. This option works only
- on Unix. It does not work in batch mode. Output paging is
- discussed further in <xref linkend="mysql-commands"/>.
+ on Unix. It does not work in batch mode.
+ <xref linkend="mysql-commands"/>, discusses output paging
+ further.
</para>
</listitem>
@@ -2063,9 +2072,9 @@
<para>
Allow only those <literal>UPDATE</literal> and
- <literal>DELETE</literal> statements that specify rows to
- affect using key values. If you have set this option in an
- option file, you can override it by using
+ <literal>DELETE</literal> statements that specify which
+ rows to modify by using key values. If you have set this
+ option in an option file, you can override it by using
<option>--safe-updates</option> on the command line. See
<xref linkend="mysql-tips"/>, for more information about
this option.
@@ -2216,8 +2225,9 @@
<para>
Append a copy of output to the given file. This option
- does not work in batch mode. Tee files are discussed
- further in <xref linkend="mysql-commands"/>.
+ does not work in batch mode. in
+ <xref linkend="mysql-commands"/>, discusses tee files
+ further.
</para>
</listitem>
@@ -2266,7 +2276,7 @@
Verbose mode. Produce more output about what the program
does. This option can be given multiple times to produce
more and more output. (For example, <option>-v -v
- -v</option> produces the table output format even in batch
+ -v</option> produces table output format even in batch
mode.)
</para>
</listitem>
@@ -2297,9 +2307,10 @@
</para>
<para>
- Print the rows of query output vertically. Without this
- option, you can specify vertical output for individual
- statements by terminating them with <literal>\G</literal>.
+ Print query output rows vertically (one line per coluumn
+ value). Without this option, you can specify vertical
+ output for individual statements by terminating them with
+ <literal>\G</literal>.
</para>
</listitem>
@@ -2521,10 +2532,10 @@
</remark>
<para>
- <command>mysql</command> sends SQL statements that you issue
- to the server to be executed. There is also a set of commands
- that <command>mysql</command> itself interprets. For a list of
- these commands, type <literal>help</literal> or
+ <command>mysql</command> sends each SQL statement that you
+ issue to the server to be executed. There is also a set of
+ commands that <command>mysql</command> itself interprets. For
+ a list of these commands, type <literal>help</literal> or
<literal>\h</literal> at the <literal>mysql></literal>
prompt:
</para>
@@ -2546,7 +2557,8 @@
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
-delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.
+delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as
+ new delimiter.
edit (\e) Edit command with $EDITOR.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
@@ -2562,7 +2574,8 @@
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
system (\!) Execute a system shell command.
-tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
+tee (\T) Set outfile [to_outfile]. Append everything into given
+ outfile.
use (\u) Use another database. Takes database name as argument.
warnings (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.
@@ -2616,10 +2629,10 @@
</para>
<para>
- Browsing or searching query results in interactive mode by
- using Unix programs such as <command>less</command>,
- <command>more</command>, or any other similar program is
- possible with the <option>--pager</option> option. If you
+ By using the <option>--pager</option> option, it is possible
+ to browse or search query results in interactive mode with
+ Unix programs such as <command>less</command>,
+ <command>more</command>, or any other similar program. If you
specify no value for the option, <command>mysql</command>
checks the value of the <literal>PAGER</literal> environment
variable and sets the pager to that. Output paging can be
@@ -2641,7 +2654,8 @@
</para>
<para>
- A few tips about the <command>pager</command> command:
+ Here are a few tips about the <command>pager</command>
+ command:
</para>
<itemizedlist>
@@ -2882,14 +2896,11 @@
<listitem>
<para>
- Use an environment variable
+ <emphasis>Use an environment variable.</emphasis> You can
+ set the <literal>MYSQL_PS1</literal> environment variable
+ to a prompt string. For example:
</para>
- <para>
- You can set the <literal>MYSQL_PS1</literal> environment
- variable to a prompt string. For example:
- </para>
-
<programlisting>
shell> <userinput>export MYSQL_PS1="(\u@\h) [\d]> "</userinput>
</programlisting>
@@ -2897,11 +2908,21 @@
<listitem>
<para>
- Use an option file
+ <emphasis>Use a command-line option.</emphasis> You can
+ set the <option>--prompt</option> option on the command
+ line to <command>mysql</command>. For example:
</para>
+<programlisting>
+shell> <userinput>mysql --prompt="(\u@\h) [\d]> "</userinput>
+(user@host) [database]>
+</programlisting>
+ </listitem>
+
+ <listitem>
<para>
- You can set the <literal>prompt</literal> option in the
+ <emphasis>Use an option file.</emphasis> You can set the
+ <literal>prompt</literal> option in the
<literal>[mysql]</literal> group of any MySQL option file,
such as <filename>/etc/my.cnf</filename> or the
<filename>.my.cnf</filename> file in your home directory.
@@ -2938,27 +2959,8 @@
<listitem>
<para>
- Use a command-line option
- </para>
-
- <para>
- You can set the <option>--prompt</option> option on the
- command line to <command>mysql</command>. For example:
- </para>
-
-<programlisting>
-shell> <userinput>mysql --prompt="(\u@\h) [\d]> "</userinput>
-(user@host) [database]>
-</programlisting>
- </listitem>
-
- <listitem>
- <para>
- Interactively
- </para>
-
- <para>
- You can change your prompt interactively by using the
+ <emphasis>Set the prompt interactively.</emphasis> You can
+ change your prompt interactively by using the
<literal>prompt</literal> (or <literal>\R</literal>)
command. For example:
</para>
@@ -2994,9 +2996,9 @@
However, it is also possible to put your SQL statements in a
file and then tell <command>mysql</command> to read its input
from that file. To do so, create a text file
- <filename>text_file</filename> that contains the statements
- you wish to execute. Then invoke <command>mysql</command> as
- shown here:
+ <replaceable>text_file</replaceable> that contains the
+ statements you wish to execute. Then invoke
+ <command>mysql</command> as shown here:
</para>
<programlisting>
@@ -3004,10 +3006,10 @@
</programlisting>
<para>
- You can also start your text file with a <literal>USE
- <replaceable>db_name</replaceable></literal> statement. In
- this case, it is unnecessary to specify the database name on
- the command line:
+ If you place a <literal>USE
+ <replaceable>db_name</replaceable></literal> statement as the
+ first statement in the file, it is unnecessary to specify the
+ database name on the command line:
</para>
<programlisting>
@@ -3015,9 +3017,9 @@
</programlisting>
<para>
- If you are running <command>mysql</command>, you can execute
- an SQL script file using the <literal>source</literal> or
- <literal>\.</literal> command:
+ If you are already running <command>mysql</command>, you can
+ execute an SQL script file using the <literal>source</literal>
+ or <literal>\.</literal> command:
</para>
<programlisting>
@@ -3027,8 +3029,8 @@
<para>
Sometimes you may want your script to display progress
- information to the user; for this you can insert some lines
- like
+ information to the user. For this you can insert statements
+ like this:
</para>
<programlisting>
@@ -3036,7 +3038,8 @@
</programlisting>
<para>
- which outputs <info_to_display>.
+ The statement shown outputs
+ <literal><info_to_display></literal>.
</para>
<para>
@@ -3156,25 +3159,25 @@
<listitem>
<para>
- All large <literal>SELECT</literal> results are
- automatically limited to 1,000 rows unless the statement
- includes a <literal>LIMIT</literal> clause.
+ The server limits all large <literal>SELECT</literal>
+ results to 1,000 rows unless the statement includes a
+ <literal>LIMIT</literal> clause.
</para>
</listitem>
<listitem>
<para>
- Multiple-table <literal>SELECT</literal> statements that
- probably need to examine more than 1,000,000 row
- combinations are aborted.
+ The server aborts multiple-table
+ <literal>SELECT</literal> statements that probably need
+ to examine more than 1,000,000 row combinations.
</para>
</listitem>
</itemizedlist>
<para>
- To specify limits other than 1,000 and 1,000,000, you can
- override the defaults by using
+ To specify limits different from 1,000 and 1,000,000, you
+ can override the defaults by using the
<option>--select_limit</option> and
<option>--max_join_size</option> options:
</para>
@@ -3196,10 +3199,11 @@
the query again. However, even if <command>mysql</command>
succeeds in reconnecting, your first connection has ended
and all your previous session objects and settings are lost:
- temporary tables, the autocommit mode, and user and session
- variables. This behavior may be dangerous for you, as in the
- following example where the server was shut down and
- restarted without you knowing it:
+ temporary tables, the autocommit mode, and user-defined and
+ session variables. Also, any current transaction rolls back.
+ This behavior may be dangerous for you, as in the following
+ example where the server was shut down and restarted without
+ you knowing it:
</para>
<programlisting>
@@ -3527,7 +3531,7 @@
</para>
<para>
- The hostname to use in the access privileges.
+ The username to use in the access privileges.
</para>
</listitem>
@@ -3617,7 +3621,7 @@
<para>
<command>mysqladmin</command> is a client for performing
administrative operations. You can use it to check the
- server's configuration and current status, create and drop
+ server's configuration and current status, to create and drop
databases, and more.
</para>
@@ -3626,11 +3630,13 @@
</para>
<programlisting>
-shell> <userinput>mysqladmin [<replaceable>options</replaceable>] <replaceable>command</replaceable> [<replaceable>command-options</replaceable>] [<replaceable>command</replaceable> [<replaceable>command-options</replaceable>]] ...</userinput>
+shell> <userinput>mysqladmin [<replaceable>options</replaceable>] <replaceable>command</replaceable> [<replaceable>command-arg</replaceable>] [<replaceable>command</replaceable> [<replaceable>command-arg</replaceable>]] ...</userinput>
</programlisting>
<para>
- <command>mysqladmin</command> supports the following commands:
+ <command>mysqladmin</command> supports the commands described
+ in the following list. Some of the commands take an argument
+ following the command name.
</para>
<itemizedlist>
@@ -3742,11 +3748,13 @@
<listitem>
<para>
- <literal>kill id,id,...</literal>
+ <literal>kill
+ <replaceable>id</replaceable>,<replaceable>id</replaceable>,...</literal>
</para>
<para>
- Kill server threads.
+ Kill server threads. If multiple thread ID values are
+ given, there must be no spaces in the list.
</para>
</listitem>
@@ -3772,24 +3780,27 @@
<para>
Set a new password. This changes the password to
- <literal>new-password</literal> for the account that you
- use with <command>mysqladmin</command> for connecting to
- the server.
+ <replaceable>new-password</replaceable> for the account
+ that you use with <command>mysqladmin</command> for
+ connecting to the server. Thus, the next time you invoke
+ <command>mysqladmin</command> (or any other client
+ program) using the same account, you will need to specify
+ the new password.
</para>
<para>
- If <replaceable>new-password</replaceable> contains spaces
- or other characters that are special to your command
- interpreter, you need to enclose it within quotes. On
- Windows, be sure to use double quotes rather than single
- quotes; single quotes are not stripped from the password,
- but rather are interpreted as part of the password. For
- example:
+ If the <replaceable>new-password</replaceable> value
+ contains spaces or other characters that are special to
+ your command interpreter, you need to enclose it within
+ quotes. On Windows, be sure to use double quotes rather
+ than single quotes; single quotes are not stripped from
+ the password, but rather are interpreted as part of the
+ password. For example:
</para>
- <para>
- shell> mysqladmin password "my new password"
- </para>
+<programlisting>
+shell> <userinput>mysqladmin password "my new password"</userinput>
+</programlisting>
</listitem>
<listitem>
@@ -3803,7 +3814,7 @@
running, 1 if it is not. This is 0 even in case of an
error such as <literal>Access denied</literal>, because
this means that the server is running but refused the
- connection, which is not the same as the server not
+ connection, which is different from the server not
running.
</para>
</listitem>
@@ -4022,7 +4033,7 @@
</para>
<para>
- The number of <literal>flush ...</literal>,
+ The number of <literal>flush-*</literal>,
<literal>refresh</literal>, and <literal>reload</literal>
commands the server has executed.
</para>
@@ -4053,8 +4064,8 @@
<para>
The amount of memory allocated directly by
- <command>mysqld</command> code. This value is displayed
- only when MySQL has been compiled with
+ <command>mysqld</command>. This value is displayed only
+ when MySQL has been compiled with
<option>--with-debug=full</option>.
</para>
</listitem>
@@ -4070,8 +4081,8 @@
<para>
The maximum amount of memory allocated directly by
- <command>mysqld</command> code. This value is displayed
- only when MySQL has been compiled with
+ <command>mysqld</command>. This value is displayed only
+ when MySQL has been compiled with
<option>--with-debug=full</option>.
</para>
</listitem>
@@ -4151,8 +4162,9 @@
</para>
<para>
- The number of iterations to make. This works only with
- <option>--sleep</option> (<option>-i</option>).
+ The number of iterations to make for repeated command
+ execution. This works only with the
+ <option>--sleep</option> option.
</para>
</listitem>
@@ -4190,8 +4202,8 @@
<para>
Do not ask for confirmation for the <literal>drop
- database</literal> command. With multiple commands,
- continue even if an error occurs.
+ <replaceable>db_name</replaceable></literal> command. With
+ multiple commands, continue even if an error occurs.
</para>
</listitem>
@@ -4257,8 +4269,8 @@
<para>
Show the difference between the current and previous
- values when used with <option>-i</option>. Currently, this
- option works only with the
+ values when used with the <option>--sleep</option> option.
+ Currently, this option works only with the
<literal>extended-status</literal> command.
</para>
</listitem>
@@ -4281,8 +4293,10 @@
</para>
<para>
- Execute commands again and again, sleeping for
- <replaceable>delay</replaceable> seconds in between.
+ Execute commands repeatedly, sleeping for
+ <replaceable>delay</replaceable> seconds in between. The
+ <option>--count</option> option determines the number of
+ iterations.
</para>
</listitem>
@@ -4350,9 +4364,9 @@
<para>
If the connection cannot be established, wait and retry
- instead of aborting. If an option value is given, it
- indicates the number of times to retry. The default is one
- time.
+ instead of aborting. If a <replaceable>count</replaceable>
+ value is given, it indicates the number of times to retry.
+ The default is one time.
</para>
</listitem>
@@ -4401,8 +4415,8 @@
</para>
<para>
- The maximum number of seconds to wait for shutdown. The
- default value is 3600 (1 hour).
+ The maximum number of seconds to wait for server shutdown.
+ The default value is 3600 (1 hour).
</para>
</listitem>
@@ -4450,7 +4464,7 @@
<refsynopsisdiv>
<cmdsynopsis>
- <command>mysqlbinlog [<literal>options</literal>] <replaceable>log-file</replaceable> …</command>
+ <command>mysqlbinlog [<literal>options</literal>] <replaceable>log_file</replaceable> …</command>
</cmdsynopsis>
</refsynopsisdiv>
@@ -4469,12 +4483,12 @@
</para>
<programlisting>
-shell> <userinput>mysqlbinlog [<replaceable>options</replaceable>] <replaceable>log-file</replaceable> ...</userinput>
+shell> <userinput>mysqlbinlog [<replaceable>options</replaceable>] <replaceable>log_file</replaceable> ...</userinput>
</programlisting>
<para>
- For example, to display the contents of the binary log
- <filename>binlog.000003</filename>, use this command:
+ For example, to display the contents of the binary log file
+ named <filename>binlog.000003</filename>, use this command:
</para>
<programlisting>
@@ -4482,11 +4496,11 @@
</programlisting>
<para>
- The output includes all statements contained in
- <filename>binlog.000003</filename>, together with other
- information such as the time each statement took, the thread
- ID of the client that issued it, the timestamp when it was
- issued, and so forth.
+ The output includes all events contained in
+ <filename>binlog.000003</filename>. Event information includes
+ the statement executed, the time the statement took, the
+ thread ID of the client that issued it, the timestamp when it
+ was issued, and so forth.
</para>
<para>
@@ -4515,8 +4529,8 @@
</para>
<para>
- The binary log is discussed further in
- <xref linkend="binary-log"/>.
+ <xref linkend="binary-log"/>, discusses the binary log
+ further.
</para>
<para>
@@ -6027,6 +6041,8 @@
Write a debugging log. The
<replaceable>debug_options</replaceable> string is often
<literal>'d:t:o,<replaceable>file_name</replaceable>'</literal>.
+ The default is
+ <literal>'d:t:o,/tmp/mysqldump.trace'</literal>.
</para>
</listitem>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r936 - in trunk: . refman-4.1 refman-5.0 refman-5.1 | paul | 19 Jan |