Author: plavin
Date: 2007-08-23 23:09:52 +0200 (Thu, 23 Aug 2007)
New Revision: 7528
Log:
Major reorganisation of contents and structure
Added:
trunk/userguide/disaster-prevention.xml
Removed:
trunk/userguide/advanced-administration.xml
trunk/userguide/disaster.xml
trunk/userguide/logfiles.xml
trunk/userguide/newuserguide.xml
trunk/userguide/security.xml
trunk/userguide/userguide.xml
Renamed/Moved:
trunk/userguide/userguide.xml--force (from rev 7515, trunk/userguide/newuserguide.xml)
Modified:
trunk/userguide/Makefile.depends
trunk/userguide/basic-administration.xml
trunk/userguide/installing.xml
trunk/userguide/introduction.xml
trunk/userguide/mysql-client-programs.xml
trunk/userguide/mysql-server-programs.xml
trunk/userguide/querying.xml
Modified: trunk/userguide/Makefile.depends
===================================================================
--- trunk/userguide/Makefile.depends 2007-08-23 18:19:59 UTC (rev 7527)
+++ trunk/userguide/Makefile.depends 2007-08-23 21:09:52 UTC (rev 7528)
Changed blocks: 8, Lines Added: 71, Lines Deleted: 143; 12805 bytes
@@ -1,55 +1,36 @@
-configuring_INCLUDES =
-configuring_IMAGES =
-configuring_SOURCES = configuring.xml $(configuring_INCLUDES)
-configuring_IDMAPS =
-configuring.validpure: $(configuring_SOURCES)
-configuring.titles: $(configuring_SOURCES)
-configuring.useless: $(configuring_SOURCES)
-configuring.valid: $(configuring_SOURCES) $(configuring_IDMAPS)
-configuring.validwarn: $(configuring_SOURCES) $(configuring_IDMAPS)
-configuring-prepped.xml: $(configuring_SOURCES) $(configuring_IDMAPS)
-configuring-manprepped.xml: $(configuring_SOURCES) $(configuring_IDMAPS)
-configuring-remprepped.xml: $(configuring_SOURCES) $(configuring_IDMAPS)
+basic_administration_INCLUDES = \
+ ../common/fixedchars.ent \
+ ../refman-common/urls.ent \
+ all-entities.ent
+basic_administration_IMAGES =
+basic_administration_SOURCES = basic-administration.xml $(basic_administration_INCLUDES)
+basic_administration_IDMAPS =
+basic-administration.validpure: $(basic_administration_SOURCES)
+basic-administration.titles: $(basic_administration_SOURCES)
+basic-administration.useless: $(basic_administration_SOURCES)
+basic-administration.valid: $(basic_administration_SOURCES) $(basic_administration_IDMAPS)
+basic-administration.validwarn: $(basic_administration_SOURCES) $(basic_administration_IDMAPS)
+basic-administration-prepped.xml: $(basic_administration_SOURCES) $(basic_administration_IDMAPS)
+basic-administration-manprepped.xml: $(basic_administration_SOURCES) $(basic_administration_IDMAPS)
+basic-administration-remprepped.xml: $(basic_administration_SOURCES) $(basic_administration_IDMAPS)
-creating_INCLUDES =
-creating_IMAGES =
-creating_SOURCES = creating.xml $(creating_INCLUDES)
-creating_IDMAPS =
-creating.validpure: $(creating_SOURCES)
-creating.titles: $(creating_SOURCES)
-creating.useless: $(creating_SOURCES)
-creating.valid: $(creating_SOURCES) $(creating_IDMAPS)
-creating.validwarn: $(creating_SOURCES) $(creating_IDMAPS)
-creating-prepped.xml: $(creating_SOURCES) $(creating_IDMAPS)
-creating-manprepped.xml: $(creating_SOURCES) $(creating_IDMAPS)
-creating-remprepped.xml: $(creating_SOURCES) $(creating_IDMAPS)
+disaster_prevention_INCLUDES = \
+ ../common/fixedchars.ent \
+ ../refman-common/urls.ent \
+ all-entities.ent
+disaster_prevention_IMAGES =
+disaster_prevention_SOURCES = disaster-prevention.xml $(disaster_prevention_INCLUDES)
+disaster_prevention_IDMAPS = \
+ metadata/backup-options.idmap
+disaster-prevention.validpure: $(disaster_prevention_SOURCES)
+disaster-prevention.titles: $(disaster_prevention_SOURCES)
+disaster-prevention.useless: $(disaster_prevention_SOURCES)
+disaster-prevention.valid: $(disaster_prevention_SOURCES) $(disaster_prevention_IDMAPS)
+disaster-prevention.validwarn: $(disaster_prevention_SOURCES) $(disaster_prevention_IDMAPS)
+disaster-prevention-prepped.xml: $(disaster_prevention_SOURCES) $(disaster_prevention_IDMAPS)
+disaster-prevention-manprepped.xml: $(disaster_prevention_SOURCES) $(disaster_prevention_IDMAPS)
+disaster-prevention-remprepped.xml: $(disaster_prevention_SOURCES) $(disaster_prevention_IDMAPS)
-disaster_INCLUDES =
-disaster_IMAGES =
-disaster_SOURCES = disaster.xml $(disaster_INCLUDES)
-disaster_IDMAPS =
-disaster.validpure: $(disaster_SOURCES)
-disaster.titles: $(disaster_SOURCES)
-disaster.useless: $(disaster_SOURCES)
-disaster.valid: $(disaster_SOURCES) $(disaster_IDMAPS)
-disaster.validwarn: $(disaster_SOURCES) $(disaster_IDMAPS)
-disaster-prepped.xml: $(disaster_SOURCES) $(disaster_IDMAPS)
-disaster-manprepped.xml: $(disaster_SOURCES) $(disaster_IDMAPS)
-disaster-remprepped.xml: $(disaster_SOURCES) $(disaster_IDMAPS)
-
-dotnet_INCLUDES =
-dotnet_IMAGES =
-dotnet_SOURCES = dotnet.xml $(dotnet_INCLUDES)
-dotnet_IDMAPS =
-dotnet.validpure: $(dotnet_SOURCES)
-dotnet.titles: $(dotnet_SOURCES)
-dotnet.useless: $(dotnet_SOURCES)
-dotnet.valid: $(dotnet_SOURCES) $(dotnet_IDMAPS)
-dotnet.validwarn: $(dotnet_SOURCES) $(dotnet_IDMAPS)
-dotnet-prepped.xml: $(dotnet_SOURCES) $(dotnet_IDMAPS)
-dotnet-manprepped.xml: $(dotnet_SOURCES) $(dotnet_IDMAPS)
-dotnet-remprepped.xml: $(dotnet_SOURCES) $(dotnet_IDMAPS)
-
excel_mysql_INCLUDES = \
../common/fixedchars.ent \
../refman-common/urls.ent \
@@ -66,19 +47,6 @@
excel-mysql-manprepped.xml: $(excel_mysql_SOURCES) $(excel_mysql_IDMAPS)
excel-mysql-remprepped.xml: $(excel_mysql_SOURCES) $(excel_mysql_IDMAPS)
-glossary_INCLUDES =
-glossary_IMAGES =
-glossary_SOURCES = glossary.xml $(glossary_INCLUDES)
-glossary_IDMAPS =
-glossary.validpure: $(glossary_SOURCES)
-glossary.titles: $(glossary_SOURCES)
-glossary.useless: $(glossary_SOURCES)
-glossary.valid: $(glossary_SOURCES) $(glossary_IDMAPS)
-glossary.validwarn: $(glossary_SOURCES) $(glossary_IDMAPS)
-glossary-prepped.xml: $(glossary_SOURCES) $(glossary_IDMAPS)
-glossary-manprepped.xml: $(glossary_SOURCES) $(glossary_IDMAPS)
-glossary-remprepped.xml: $(glossary_SOURCES) $(glossary_IDMAPS)
-
indexing_INCLUDES = \
images/indexing-displaying-administrator.png
indexing_IMAGES = \
@@ -86,7 +54,7 @@
indexing_SOURCES = indexing.xml $(indexing_INCLUDES)
indexing_IDMAPS = \
metadata/glossary.idmap \
- metadata/logfiles.idmap \
+ metadata/newuserguide.idmap \
metadata/storage-engines.idmap
indexing.validpure: $(indexing_SOURCES)
indexing.titles: $(indexing_SOURCES)
@@ -123,19 +91,6 @@
introduction-manprepped.xml: $(introduction_SOURCES) $(introduction_IDMAPS)
introduction-remprepped.xml: $(introduction_SOURCES) $(introduction_IDMAPS)
-java_INCLUDES =
-java_IMAGES =
-java_SOURCES = java.xml $(java_INCLUDES)
-java_IDMAPS =
-java.validpure: $(java_SOURCES)
-java.titles: $(java_SOURCES)
-java.useless: $(java_SOURCES)
-java.valid: $(java_SOURCES) $(java_IDMAPS)
-java.validwarn: $(java_SOURCES) $(java_IDMAPS)
-java-prepped.xml: $(java_SOURCES) $(java_IDMAPS)
-java-manprepped.xml: $(java_SOURCES) $(java_IDMAPS)
-java-remprepped.xml: $(java_SOURCES) $(java_IDMAPS)
-
legalnotice_en_INCLUDES =
legalnotice_en_IMAGES =
legalnotice_en_SOURCES = legalnotice.en.xml $(legalnotice_en_INCLUDES)
@@ -149,23 +104,6 @@
legalnotice.en-manprepped.xml: $(legalnotice_en_SOURCES) $(legalnotice_en_IDMAPS)
legalnotice.en-remprepped.xml: $(legalnotice_en_SOURCES) $(legalnotice_en_IDMAPS)
-logfiles_INCLUDES = \
- images/logfiles-slow-query-log-administrator-settings.png \
- images/logfiles-slow-query-log-administrator-view.png
-logfiles_IMAGES = \
- images/logfiles-slow-query-log-administrator-settings.png \
- images/logfiles-slow-query-log-administrator-view.png
-logfiles_SOURCES = logfiles.xml $(logfiles_INCLUDES)
-logfiles_IDMAPS =
-logfiles.validpure: $(logfiles_SOURCES)
-logfiles.titles: $(logfiles_SOURCES)
-logfiles.useless: $(logfiles_SOURCES)
-logfiles.valid: $(logfiles_SOURCES) $(logfiles_IDMAPS)
-logfiles.validwarn: $(logfiles_SOURCES) $(logfiles_IDMAPS)
-logfiles-prepped.xml: $(logfiles_SOURCES) $(logfiles_IDMAPS)
-logfiles-manprepped.xml: $(logfiles_SOURCES) $(logfiles_IDMAPS)
-logfiles-remprepped.xml: $(logfiles_SOURCES) $(logfiles_IDMAPS)
-
modifying_INCLUDES =
modifying_IMAGES =
modifying_SOURCES = modifying.xml $(modifying_INCLUDES)
@@ -179,19 +117,38 @@
modifying-manprepped.xml: $(modifying_SOURCES) $(modifying_IDMAPS)
modifying-remprepped.xml: $(modifying_SOURCES) $(modifying_IDMAPS)
-php_mysqli_INCLUDES =
-php_mysqli_IMAGES =
-php_mysqli_SOURCES = php-mysqli.xml $(php_mysqli_INCLUDES)
-php_mysqli_IDMAPS =
-php-mysqli.validpure: $(php_mysqli_SOURCES)
-php-mysqli.titles: $(php_mysqli_SOURCES)
-php-mysqli.useless: $(php_mysqli_SOURCES)
-php-mysqli.valid: $(php_mysqli_SOURCES) $(php_mysqli_IDMAPS)
-php-mysqli.validwarn: $(php_mysqli_SOURCES) $(php_mysqli_IDMAPS)
-php-mysqli-prepped.xml: $(php_mysqli_SOURCES) $(php_mysqli_IDMAPS)
-php-mysqli-manprepped.xml: $(php_mysqli_SOURCES) $(php_mysqli_IDMAPS)
-php-mysqli-remprepped.xml: $(php_mysqli_SOURCES) $(php_mysqli_IDMAPS)
+mysql_client_programs_INCLUDES = \
+ ../common/fixedchars.ent \
+ ../refman-common/urls.ent \
+ all-entities.ent
+mysql_client_programs_IMAGES =
+mysql_client_programs_SOURCES = mysql-client-programs.xml $(mysql_client_programs_INCLUDES)
+mysql_client_programs_IDMAPS =
+mysql-client-programs.validpure: $(mysql_client_programs_SOURCES)
+mysql-client-programs.titles: $(mysql_client_programs_SOURCES)
+mysql-client-programs.useless: $(mysql_client_programs_SOURCES)
+mysql-client-programs.valid: $(mysql_client_programs_SOURCES) $(mysql_client_programs_IDMAPS)
+mysql-client-programs.validwarn: $(mysql_client_programs_SOURCES) $(mysql_client_programs_IDMAPS)
+mysql-client-programs-prepped.xml: $(mysql_client_programs_SOURCES) $(mysql_client_programs_IDMAPS)
+mysql-client-programs-manprepped.xml: $(mysql_client_programs_SOURCES) $(mysql_client_programs_IDMAPS)
+mysql-client-programs-remprepped.xml: $(mysql_client_programs_SOURCES) $(mysql_client_programs_IDMAPS)
+mysql_server_programs_INCLUDES = \
+ ../common/fixedchars.ent \
+ ../refman-common/urls.ent \
+ all-entities.ent
+mysql_server_programs_IMAGES =
+mysql_server_programs_SOURCES = mysql-server-programs.xml $(mysql_server_programs_INCLUDES)
+mysql_server_programs_IDMAPS =
+mysql-server-programs.validpure: $(mysql_server_programs_SOURCES)
+mysql-server-programs.titles: $(mysql_server_programs_SOURCES)
+mysql-server-programs.useless: $(mysql_server_programs_SOURCES)
+mysql-server-programs.valid: $(mysql_server_programs_SOURCES) $(mysql_server_programs_IDMAPS)
+mysql-server-programs.validwarn: $(mysql_server_programs_SOURCES) $(mysql_server_programs_IDMAPS)
+mysql-server-programs-prepped.xml: $(mysql_server_programs_SOURCES) $(mysql_server_programs_IDMAPS)
+mysql-server-programs-manprepped.xml: $(mysql_server_programs_SOURCES) $(mysql_server_programs_IDMAPS)
+mysql-server-programs-remprepped.xml: $(mysql_server_programs_SOURCES) $(mysql_server_programs_IDMAPS)
+
populating_INCLUDES =
populating_IMAGES =
populating_SOURCES = populating.xml $(populating_INCLUDES)
@@ -218,19 +175,6 @@
querying-manprepped.xml: $(querying_SOURCES) $(querying_IDMAPS)
querying-remprepped.xml: $(querying_SOURCES) $(querying_IDMAPS)
-security_INCLUDES =
-security_IMAGES =
-security_SOURCES = security.xml $(security_INCLUDES)
-security_IDMAPS =
-security.validpure: $(security_SOURCES)
-security.titles: $(security_SOURCES)
-security.useless: $(security_SOURCES)
-security.valid: $(security_SOURCES) $(security_IDMAPS)
-security.validwarn: $(security_SOURCES) $(security_IDMAPS)
-security-prepped.xml: $(security_SOURCES) $(security_IDMAPS)
-security-manprepped.xml: $(security_SOURCES) $(security_IDMAPS)
-security-remprepped.xml: $(security_SOURCES) $(security_IDMAPS)
-
storage_engines_INCLUDES =
storage_engines_IMAGES =
storage_engines_SOURCES = storage-engines.xml $(storage_engines_INCLUDES)
@@ -257,53 +201,37 @@
stored-procedures-manprepped.xml: $(stored_procedures_SOURCES) $(stored_procedures_IDMAPS)
stored-procedures-remprepped.xml: $(stored_procedures_SOURCES) $(stored_procedures_IDMAPS)
-tools_tricks_INCLUDES =
-tools_tricks_IMAGES =
-tools_tricks_SOURCES = tools-tricks.xml $(tools_tricks_INCLUDES)
-tools_tricks_IDMAPS =
-tools-tricks.validpure: $(tools_tricks_SOURCES)
-tools-tricks.titles: $(tools_tricks_SOURCES)
-tools-tricks.useless: $(tools_tricks_SOURCES)
-tools-tricks.valid: $(tools_tricks_SOURCES) $(tools_tricks_IDMAPS)
-tools-tricks.validwarn: $(tools_tricks_SOURCES) $(tools_tricks_IDMAPS)
-tools-tricks-prepped.xml: $(tools_tricks_SOURCES) $(tools_tricks_IDMAPS)
-tools-tricks-manprepped.xml: $(tools_tricks_SOURCES) $(tools_tricks_IDMAPS)
-tools-tricks-remprepped.xml: $(tools_tricks_SOURCES) $(tools_tricks_IDMAPS)
-
userguide_INCLUDES = \
../common/fixedchars.ent \
../refman-common/urls.ent \
all-entities.ent \
- configuring.xml \
- creating.xml \
- disaster.xml \
- dotnet.xml \
+ basic-administration.xml \
+ disaster-prevention.xml \
excel-mysql.xml \
- glossary.xml \
images/indexing-displaying-administrator.png \
images/logfiles-slow-query-log-administrator-settings.png \
images/logfiles-slow-query-log-administrator-view.png \
indexing.xml \
installing.xml \
introduction.xml \
- java.xml \
legalnotice.en.xml \
- logfiles.xml \
modifying.xml \
- php-mysqli.xml \
+ mysql-client-programs.xml \
+ mysql-server-programs.xml \
populating.xml \
querying.xml \
- security.xml \
storage-engines.xml \
stored-procedures.xml \
- tools-tricks.xml \
views.xml
userguide_IMAGES = \
images/indexing-displaying-administrator.png \
images/logfiles-slow-query-log-administrator-settings.png \
images/logfiles-slow-query-log-administrator-view.png
userguide_SOURCES = userguide.xml $(userguide_INCLUDES)
-userguide_IDMAPS =
+userguide_IDMAPS = \
+ metadata/backup-options.idmap \
+ metadata/glossary.idmap \
+ metadata/newuserguide.idmap
userguide.validpure: $(userguide_SOURCES)
userguide.titles: $(userguide_SOURCES)
userguide.useless: $(userguide_SOURCES)
Modified: trunk/userguide/basic-administration.xml
===================================================================
--- trunk/userguide/basic-administration.xml 2007-08-23 18:19:59 UTC (rev 7527)
+++ trunk/userguide/basic-administration.xml 2007-08-23 21:09:52 UTC (rev 7528)
Changed blocks: 4, Lines Added: 32, Lines Deleted: 351; 9054 bytes
@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
-<chapter id="installing">
+"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % all.entities SYSTEM "all-entities.ent">
+%all.entities;
+]>
+<chapter id="userguide-installing">
+
<title>Basic Administration</title>
<section id="basic-administration">
@@ -38,7 +43,23 @@
</section>
-<!-- END INTRODUCTION -->
+<!-- END INTRODUCTION -->
+
+
+ <!--Start MySQL Administrator-->
+
+ <section id="using-mysql-administrator">
+
+ <title>Using MySQL Administrator</title>
+
+ <para>
+ Advantages
+ </para>
+
+ </section>
+
+ <!--End MySQL Administrator-->
+
<!-- Start starting-stopping -->
@@ -55,16 +76,10 @@
</para>
<para>
- stopping and starting mysqld use mysqladmin and mysqld_safe? the
- mysql.server startup script still defaults to using mysqld_safe:
+ stopping and starting mysqld use mysqladmin and mysqld_safe?
</para>
<para>
- mysqld_safe is the recommended way to start a mysqld server on
- Unix and NetWare.
- </para>
-
- <para>
options for use are --help Normally, you should not edit the
mysqld_safe script. Instead, configure mysqld_safe by using
command-line options or options in the [mysqld_safe] section of a
@@ -74,356 +89,22 @@
</section>
<!-- End starting-stopping -->
-
-<!-- Start mysql client -->
-
- <section id="mysql-client">
-
- <title>The MySQL Client</title>
-
- <para>
- edit only available on Unix must have commands: table of options
- short and long and description? tee clear help notee use help
- contents source prompt --xml --execute=statement, -e statement
- system Not going to mention pager since this option only works
- under Unix but go to the manual if
- </para>
-
- <para>
- prompt many options we'll mention \d for the current database
- </para>
-
- <para>
- An alternative to the <command>source</command> command is to
- redirect a script file to the <command>mysql</command> command
- from the command prompt. You can do this in the following way:
- </para>
-
-<programlisting>
- shell> <command>mysql</command> <option>-u</option> <replaceable>peter</replaceable> <option>-p</option> > <replaceable>file.sql</replaceable>
-</programlisting>
-
- <para>
- promised not to mention OS-specific commands but if you are
- working on the a Unix platform you will want to refer to the
- manual and find out more about the <command>system</command> and
- the <command>pager</command> commands.
- </para>
-
- <para>
- use of the arrow keys to retrieve commands
- </para>
-
- <para>
- passing arguments at the command line is cumbersome as with other
- utilities we'll see how common or default options can be added to
- a configuration file
- </para>
-
- </section>
-
-<!-- End mysql client -->
-
-<!-- Start Utilities -->
-
- <section id="other-utilities">
-
- <title>Other Administration Utilities</title>
-
- <para>
- utilities that are available on all platforms so no mysqlhotcopy
- </para>
-
- <para>
- some commands are common to most utilities most important --help
- </para>
-
- <para>
- my_print_defaults
- </para>
-
- <itemizedlist>
-
- <listitem>
- <para>
- mysqladmin
- </para>
- </listitem>
-
- <listitem>
- <para>
- mysqldump
- </para>
- </listitem>
-
- <listitem>
- <para>
- mysqlimport - short comments anyway
- </para>
- </listitem>
-
- <listitem>
- <para>
- mysqlshow?
- </para>
- </listitem>
-
- <listitem>
- <para>
- mysqlaccess?
- </para>
- </listitem>
-
- </itemizedlist>
-
- <section id="mysqladmin">
-
- <title>Using mysqladmin</title>
-
- <para>
- mysqladmin commands
- </para>
-
- <itemizedlist>
-
- <listitem>
- <para>
- shutdown
- </para>
- </listitem>
-
- <listitem>
- <para>
- create
- </para>
- </listitem>
-
- <listitem>
- <para>
- drop
- </para>
- </listitem>
-
- <listitem>
- <para>
- ping
- </para>
- </listitem>
-
- </itemizedlist>
-
- <para>
- mysqladmin options the general options are the important ones
- it's the commands that matter
-
- <itemizedlist>
-
- <listitem>
- <para>
- help host password user
- </para>
- </listitem>
-
- <listitem>
- <para></para>
- </listitem>
-
- <listitem>
- <para></para>
- </listitem>
-
- <listitem>
- <para></para>
- </listitem>
-
- </itemizedlist>
- </para>
-
- </section>
-
- </section>
-
-<!-- End Utilities -->
-
-<!--Start administering users-->
-
+
+ <!--Start administering users-->
+
<section id="administering-users">
-
+
<title>Administering Users</title>
-
+
<para>
the way that you set rights for a development database and for a
production database will be quite different
</para>
-
+
</section>
-
-<!--End administering users-->
-
-<!--Start my.cnf-->
-
- <section id="configuration-file">
-
- <title>The MySQL Configuration File</title>
-
- <para></para>
-
- <para>
- sample files come with make your life easier tee
- </para>
-
- <para>
- on Windows the found in the <filename>C:\Program Files\MySQL\MySQL
- Server 5.0\</filename> directory on unix
- <filename>\usr\share\mysql</filename>
- </para>
-
- <table>
- <title>Configuration files</title>
- <tgroup cols="2">
- <colspec colwidth="1in"/>
- <colspec colwidth="1in"/>
- <thead>
- <row>
- <entry><emphasis role="bold">Windows</emphasis></entry>
- <entry><emphasis role="bold">Unix/Mac OS X</emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>my-small.ini</entry>
- <entry>my-small.cnf</entry>
- </row>
- <row>
- <entry>my-medium.ini</entry>
- <entry>my-medium.cnf</entry>
- </row>
- <row>
- <entry>my-large.ini</entry>
- <entry>my-large.cnf</entry>
- </row>
- <row>
- <entry>my-huge.ini</entry>
- <entry>my-huge.cnf</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <para>
- there are other files but these will do ()
- </para>
-
- <para>
- the sections are:
-
- <itemizedlist>
-
- <listitem>
- <para>
- client
- </para>
- </listitem>
-
- <listitem>
- <para>
- mysqld
- </para>
- </listitem>
-
- <listitem>
- <para>
- safe-mysqld
- </para>
- </listitem>
-
- <listitem>
- <para>
- mysqldump
- </para>
- </listitem>
-
- <listitem>
- <para>
- mysql
- </para>
- </listitem>
-
- </itemizedlist>
- </para>
-
- <para>
- You can copy this file to # /etc/my.cnf to set global options, #
- mysql-data-dir/my.cnf to set server-specific options (in this #
- installation this directory is /var/lib/mysql) or # ~/.my.cnf to
- set user-specific options.
- </para>
-
- <para>
- must note the different modes and why you would use a specific
- mode
- </para>
-
- <para>
- set the default database type
- </para>
-
- <para>
- a sample configuration file
- </para>
-
-<programlisting>
- #all clients
- [client]
- #don't use user -- let default
- #user=peter
- password=merlin
- #apply to the shell only
- [mysql]
- #show current database as the prompt
- prompt="\d > "
- #allow use of LOAD DATA INFILE
- local-infile=1
+ <!--End administering users-->
- [mysqld]
-
- sql-mode="TRADITIONAL"
-
- #applies to mysqldump only
- [mysqldump]
- quick
-</programlisting>
- <para>
- explanation
- </para>
-
- <para>
- user in the mysqld section --user={user_name|user_id} Run the
- mysqld server as the user having the name user _name or the
- numeric user ID user_id. (“User” in this context refers to a
- system login account, not a MySQL user listed in the grant
- tables.)
- </para>
-
- </section>
-
-<!--End my.cnf-->
-
-<!--Start MySQL Administrator-->
-
- <section id="using-mysql-administrator">
-
- <title>Using MySQL Administrator</title>
-
- <para>
- Advantages
- </para>
-
- </section>
-
-<!--End MySQL Administrator-->
-
</chapter>
<!-- END Basic Administration CHAPTER -->
Added: trunk/userguide/disaster-prevention.xml
===================================================================
--- trunk/userguide/disaster-prevention.xml (rev 0)
+++ trunk/userguide/disaster-prevention.xml 2007-08-23 21:09:52 UTC (rev 7528)
Changed blocks: 1, Lines Added: 791, Lines Deleted: 0; 30031 bytes
@@ -0,0 +1,791 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % all.entities SYSTEM "all-entities.ent">
+%all.entities;
+]>
+<chapter>
+
+ <title>Disaster Prevention and Recovery</title>
+
+ <section>
+
+ <title>Introduction</title>
+
+ <para></para>
+
+ </section>
+
+ <section>
+
+ <title>Backup Options</title>
+
+ <section id="user-guide-mysqldump-intro">
+
+ <title>Using <command>mysqldump</command></title>
+
+ <para>
+ <remark>
+ [PL] Move to later section?
+ </remark>
+
+ The <command>mysqldump</command> utility is a database back-up
+ program capable of copying everything on a specific MySQL server
+ — both the database objects and the data. It can also be
+ used to copy a number of databases, one particular database, one
+ or more tables from a specific database, or just specific
+ records from one table. Any kind of data can be saved using this
+ utility — even images stored as binary data.
+ </para>
+
+ <para>
+ The <command>mysqldump</command> utility creates a script file
+ of SQL statements that recreate the database objects selected
+ and it also creates <literal>INSERT</literal> statements to
+ restore data. There are various other ways to back up MySQL
+ databases or tables; using the <command>mysql</command> client
+ program and SQL statements, copying the MySQL data directory,
+ using binary logs, using MySQL Administrator, and also the
+ Unix-specific utility, <command>mysqlhotcopy</command>. However,
+ <command>mysqldump</command> is the most versatile and
+ accessible tool for backing up tables and databases and it is
+ available for all operating systems.
+ </para>
+
+ <para>
+ The reasons for creating back-up files vary:
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ As replacements for existing files in the event of
+ database corruption
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ To transfer files from a development server to a
+ production server
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ To migrate to another file format
+ </para>
+ </listitem>
+
+ </itemizedlist>
+ </para>
+
+ <para>
+ This chapter shows how to use <command>mysqldump</command> for
+ each of these tasks. This is not meant as a definite treatment
+ of <literal>mysqldump</literal>; for complete coverage of this
+ utility see
+ <ulink url="&base-url-refman;5.0/en/mysqldump.html"/>.
+ </para>
+
+<!-- start options -->
+
+ <section id="mysqldump-options">
+
+ <title>Options</title>
+
+ <para>
+ This section identifies the most commonly used options and
+ briefly describes each one. Examples of using these options
+ are given in subsequent sections.
+ </para>
+
+ <para>
+ Since the <command>mysqldump</command> utility gives access to
+ a specific MySQL server, you must have credentials on that
+ server; you must explicitly or implicitly provide a
+ <option>--user</option> and <option>--password</option>.
+ Likewise you must provide <option>--host</option> and
+ <option>--port</option> options. In this respect,
+ <command>mysqldump</command> does not differ from the MySQL
+ client program, <command>mysql</command>, or from other
+ utilities such as <command>mysqladmin</command>.
+ </para>
+
+ <para>
+ Other common options are:
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ <option>--all-databases, -A </option> – Dump all
+ tables in all databases.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--databases, -B </option> – Specify this
+ option and <command>mysqldump</command> regards all name
+ arguments as database names
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--fields-terminated-by </option> – Used in
+ conjunction with the <option>--tab</option> option to
+ specify a field terminator.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--no-create-db</option> – Used in
+ conjunction with the <option>--all-databases</option> or
+ the <option>--databases</option> option to suppress the
+ <literal>CREATE DATABASE</literal> statement
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--no-data</option> – Save database objects
+ but not data.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--opt </option> – This option is shorthand
+ for a group of options. See
+ <xref linkend="opt-group-options"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--skip-opt </option> – Turn off the
+ <option>--opt</option> group of options.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--tab=<replaceable>path</replaceable>, -T
+ <replaceable>path</replaceable> </option> – Create
+ tab-separated data files in the named directory.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--tables </option> – Override the
+ <option>--databases</option> option.
+ <command>mysqldump</command> regards all name arguments
+ following this option as table names.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--where=<replaceable>'where_condition'</replaceable>,
+ -w <replaceable>'where_condition'</replaceable>
+ </option> – Only dump rows selected by the where
+ condition.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--xml </option> – Dump output as XML.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+ </para>
+
+ <para>
+ The <option>--all-databases</option> option is used when you
+ want to dump the entire contents of a server. On the other
+ hand, the <option>--databases</option> option lets you specify
+ particular databases to copy. Both of these options add a
+ <literal>CREATE DATABASE</literal> statement to the dump file.
+ To turn off this feature use the
+ <option>--no-create-db</option> option. You can also choose
+ not to save any data by using the <option>--no-data</option>
+ option.
+ </para>
+
+ <para>
+ The <option>--tables</option> option makes it possible to use
+ the <option>--databases</option> option and also specify which
+ tables you would like to dump.
+ </para>
+
+ <para>
+ Use the <option>--tab</option> and
+ <option>--fields-terminated-by</option> options, to dump a
+ database in a variety of text formats. For XML format, use the
+ <option>--xml</option> option. To select only specific rows
+ from a table use the <option>--where</option> option.
+ </para>
+
+ <para>
+ For a complete list of all the available options see
+ <ulink url="&base-url-refman;5.0/en/mysqldump.html"/>.
+ </para>
+
+ <section id="opt-group-options">
+
+ <title>The <option>--opt</option> Group of Options</title>
+
+ <para>
+ The <option>--opt</option> option is on by default so you
+ don't have to specify it. However, you do need to know what
+ it does. Using <option>--opt</option> is shorthand for
+ specifying <option> --add-locks, --add-drop-table,
+ --create-options, --disable-keys, --extended-insert,
+ --lock-tables, --quick,</option> and
+ <option>--set-charset</option>. Find a brief description of
+ these options in what follows.
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ <option>--add-locks </option> – Lock tables
+ before inserting data.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--add-drop-table </option> – Remove
+ tables before recreating them.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--create-options </option> – Include all
+ MySQL-specific table options in the <literal>CREATE
+ TABLE</literal> statements.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--disable-keys </option> – Improve speed
+ by disabling indexes before inserting data. (Applies
+ only to MyISAM tables and only to non-unique indexes.)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--extended-insert </option> – Use
+ multiple-row <literal>INSERT</literal> syntax that
+ includes a <literal>VALUES</literal> list for each
+ row.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--lock-tables </option> – Lock tables
+ before dumping them.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--quick </option> – Retrieve rows from a
+ table one row at a time, reducing demands on memory.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <option>--set-charset</option> – Add
+ <literal>SET NAMES</literal>
+ <replaceable>default_character_set</replaceable> to
+ the output.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+ </para>
+
+ <para>
+ Each of these options can be turned off individually by
+ using the
+ <option>--skip-<replaceable>option-name</replaceable></option>
+ syntax. For example, if you want to ensure that you recreate
+ tables as the server default table type, you can turn off
+ <option>--create-options</option> by specifying
+ <option>--skip-create-options</option>. No engine or
+ character set will be specified in the <literal>CREATE
+ TABLE</literal> statement. Turn off
+ <option>--extended-insert</option> by specifying the
+ <option>--skip-extended-inserts</option> option. Doing this
+ creates a separate <literal>INSERT</literal> statement for
+ each row, making it much easier to remove individual
+ <literal>INSERT</literal> statements.
+ </para>
+
+ </section>
+
+ </section>
+
+<!-- back-up -->
+
+ <section id="backing-up">
+
+ <title>Backing Up Data and Database Objects</title>
+
+ <para>
+ To back up the contents of a server and create replacements
+ for all existing databases invoke the
+ <command>mysqldump</command> utility specifying your
+ credentials and the <option>--all-databases</option> option.
+ Using the option short forms, you can back up a server and
+ redirect output to a file in the following way:
+ </para>
+
+<programlisting>
+shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p -A > <replaceable>dump.sql</replaceable></userinput>
+</programlisting>
+
+ <para>
+ Using the short forms shown in the preceding listing is
+ equivalent to using the <option>--user, --password,</option>
+ and <option>--all-databases</option> options. Output is sent
+ to a file using the redirection operator,
+ ‘<literal>></literal>’. Since the
+ <option>--host</option> option is not specified, it defaults
+ to <literal>localhost</literal>. Likewise,
+ <option>--port</option> will default to
+ <literal>3306</literal>. Since no password is given at the
+ command line, you will be prompted for one.
+ </para>
+
+ <para>
+ Specifying your password at the command line is allowed but
+ note that you cannot leave a space between the option and your
+ password; it must appear as
+ <option>-p<replaceable>password</replaceable></option>. If a
+ space was allowed, the <option>-A</option> option in the
+ preceding listing would be interpreted as the password.
+ </para>
+
+ <para>
+ If you wish to copy only specific databases, replace
+ <option>-A</option> with the <option>--databases</option>
+ option (or its short form, <option>-B</option>) followed by
+ the names of the databases that you wish to back up. The file
+ created by this command will contain only the databases
+ specified.
+ </para>
+
+ <para>
+ Using <command>mysqldump</command> to back up specific
+ databases or all the databases on a server is an easy way to
+ create replacements in the event of lost data or database
+ corruption.
+ </para>
+
+ <section id="refining-objects-selected">
+
+ <title>Further Refining the Objects and Data Selected</title>
+
+ <para>
+ If you wish to copy only one database, you do not need to
+ use the <option>--databases</option> option. Simply specify
+ your credentials and the database name in the following
+ fashion:
+ </para>
+
+<programlisting>
+shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p <replaceable>db_name</replaceable> > <replaceable>dump.sql</replaceable></userinput>
+</programlisting>
+
+ <para>
+ A specific database is selected by using the database name
+ — no option is necessary. Output is again redirected
+ to the file using the redirection operator.
+ </para>
+
+ <para>
+ Remember that the <option>--opt</option> group of options is
+ on by default. (For a complete list of this group of options
+ see <xref linkend="opt-group-options"/>.) To turn off any
+ one of these options you can use the
+ <option>--skip-<replaceable>option-name</replaceable></option>
+ option.
+ </para>
+
+ <para>
+ On the other hand, if you want to turn off most of the
+ <option>--opt</option> options, it may be easier to specify
+ <option>--skip-opt</option> and then list the options you
+ wish to use.
+ </para>
+
+ <note>
+ <para>
+ If you choose to do things this way, make sure that you
+ specify <option>--skip-opt</option> first. If it is the
+ last option specified, it will turn off any of the
+ <option>--opt</option> group of options that precede it.
+ </para>
+ </note>
+
+ <para>
+ In some cases you may want to copy only selected tables from
+ a database. This is done by naming the desired tables
+ immediately following the database name. For example:
+ </para>
+
+<programlisting>
+shell> <userinput>mysqldump <replaceable>[options]</replaceable> <replaceable>db_name table1 table2</replaceable></userinput>
+</programlisting>
+
+ <para>
+ When dumping a specific table, the data selection can be
+ further refined by adding a <option>--where</option> option
+ in the following way:
+ </para>
+
+<programlisting>
+shell> <userinput>mysqldump [options] <replaceable>db_name table1</replaceable> --where=<replaceable>'field_name>1000'</replaceable></userinput>
+</programlisting>
+
+ <para>
+ When using the <option>--where</option> option only one
+ table may be specified. The script file created will contain
+ a <literal>CREATE TABLE</literal> statement for
+ reconstructing the table and any data that meets the
+ condition specified using the <option>--where</option>
+ option.
+ </para>
+
+ <note>
+ <para>
+ If the <option>--where</option> option contains spaces or
+ characters special to your command interpreter, then you
+ must enclose everything in the where condition in
+ quotation marks.
+ </para>
+ </note>
+
+ <para>
+ Using a database name at the command line creates a copy of
+ the tables and the data from the specified database.
+ However, no database is created when this syntax is used.
+ </para>
+
+ <para>
+ To dump only one database and add a <literal>CREATE
+ DATABASE</literal> statement, you must use the
+ <option>--databases</option> option. An example using the
+ short form of the <option>--databases</option> option
+ follows:
+ </para>
+
+<programlisting>
+shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p -B <replaceable>db_name</replaceable> > <replaceable>dump.sql</replaceable></userinput>
+</programlisting>
+
+ <para>
+ If you wish your dump file to contain a <literal>CREATE
+ DATABASE</literal> statement and you only wish to dump
+ selected tables use the <option>--tables</option> option as
+ shown in the following:
+ </para>
+
+<programlisting>
+shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p -B <replaceable>db_name</replaceable> <option>--tables <replaceable>table1</replaceable></option> > <replaceable>dump.sql</replaceable></userinput>
+</programlisting>
+
+ <para>
+ If you don't specify the <option>--tables</option> option,
+ the <option>-B</option> option interprets each name as a
+ database.
+ </para>
+
+ <para>
+ The next section examines how to restore databases from the
+ script files created by <command>mysqldump</command>.
+ </para>
+
+ </section>
+
+ </section>
+
+ <section id="restoring-database-dumps">
+
+ <title>Restoring Database Dumps</title>
+
+ <para>
+ Databases are restored by redirecting the script file to the
+ <command>mysql</command> client program.
+
+ <remark>
+ xref here?
+ </remark>
+
+ If the script file was created using either the
+ <option>-A</option> or <option>-B</option> options, restore
+ the dumped files in the following way:
+ </para>
+
+<programlisting>
+shell> <userinput>mysql -u <replaceable>user_name</replaceable> -p < <replaceable>dump.sql</replaceable></userinput>
+</programlisting>
+
+ <warning>
+ <para>
+ Using the <option>-A</option> or <option>-B</option> option
+ with <command>mysqldump</command> creates a script that
+ drops and recreates databases. Any data in existing
+ databases will be lost. Furthermore, if you backed up all
+ databases then the <literal>mysql</literal> database will be
+ overwritten. Be sure that this is what you intend. For more
+ information see ...
+
+ <remark>
+ xref here
+ </remark>
+ </para>
+ </warning>
+
+ <para>
+ If you created your dump file without using the
+ <option>-A</option> or <option>-B</option> options, then the
+ database that you copy the tables to must already exist. Name
+ that database when invoking <command>mysql</command>:
+ </para>
+
+<programlisting>
+shell> <userinput>mysql -u <replaceable>user_name</replaceable> -p <replaceable>db_name</replaceable> < <replaceable>dump.sql</replaceable></userinput>
+</programlisting>
+
+ <para>
+ In this case, you need not worry about overwriting an existing
+ database, but you will overwrite any tables in the existing
+ database that have the same names as tables in the back-up
+ file if the file contains <literal>DROP TABLE</literal> and
+ <literal>CREATE TABLE</literal> statements. To remove these
+ statements from a dump file, create it using the
+ <option>--skip-add-drop-table</option> and
+ <option>--no-create-info</option> options.
+ </para>
+
+ <para>
+ If you are uploading a database dump file to a remote database
+ then you will have to specify the <option>--host</option>
+ option. If you don't have access to your MySQL server from a
+ remote location, copy your script file to the server, log in
+ using <command>ssh</command>, and then run
+ <command>mysql</command>. If neither of these options is
+ available to you, you may be able to upload and execute the
+ script file using a program such as phpMyAdmin.
+ </para>
+
+ </section>
+
+<!-- Start Exporting -->
+
+ <section id="exporting-from-mysql">
+
+ <title>Exporting From MySQL</title>
+
+ <para>
+ To use the data from a MySQL database in another application
+ — a word processor or a spreadsheet, for example —
+ you might want to export data in text format. The most common
+ way of exporting a file in text format is by using the
+ <option>--tab</option> or <option>-T</option> option and
+ specifying the full pathname to the target directory:
+ </para>
+
+<programlisting>
+shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p <replaceable>db_name</replaceable> -T <replaceable>/tmp</replaceable></userinput>
+</programlisting>
+
+ <para>
+ Dumping a database specifying this option creates a script
+ file of each table's structure using the table name and the
+ extension <literal>sql</literal> as the file name and a
+ tab-separated file of each table's data using the table name
+ and the extension <literal>txt</literal> as the file name.
+ These files are created in the directory specified with the
+ <option>-T</option> option. This directory must be writable
+ and the user indicated by <replaceable>user_name</replaceable>
+ must have the <literal>FILE</literal> privilege. For more
+ information about the <literal>FILE</literal> privilege see
+ ...
+
+ <remark>
+ Add xref to FILE here
+ </remark>
+ </para>
+
+ <para>
+ File permissions are not usually a problem on Windows systems
+ but the file separator and spaces in file names can present
+ difficulties. Use a forward slash to separate directories and,
+ if a directory contains spaces, enclose the path in quotation
+ marks, for example, <quote>C:/Documents and
+ Settings/peter/Desktop/</quote>. Failure to include quotation
+ marks results in the following error:
+ </para>
+
+<programlisting>
+mysqldump: Got error: 1049; Unknown database 'and' when selecting the database
+</programlisting>
+
+ <para>
+ Despite its name, the <option>--tab</option> option can be
+ used to created files with a field terminator other than the
+ <literal>tab</literal> character. The field terminator is
+ changed by using the <option>--fields-terminated-by</option>
+ option. For example you can specify a
+ ‘<literal>,</literal>’ as the terminator in order
+ to use a table in a spreadsheet program.
+ </para>
+
+ <para>
+ The <option>--tab</option> option is designed to extract data
+ from one database only and cannot be used with the
+ <option>--databases</option> option, or with the
+ <option>--all-databases</option> option. Whenever it is used a
+ database name must be one of the arguments to
+ <command>mysqldump</command>.
+ </para>
+
+ <para>
+ To further refine the data selected, the
+ <option>--tab</option> option can also be used to select data
+ from one table only. This is done by naming the desired table
+ after selecting the database. The <option>--tab</option>
+ option can also be used with the <option>--where</option>
+ option as shown in
+ <xref linkend="refining-objects-selected"/>.
+ </para>
+
+ <para>
+ Often, when creating text files there is no need for the
+ script file that creates the table structure — you're
+ simply interested in exporting the data. In cases like this it
+ would be nice to have an option to copy only data. No such
+ option exists but we will see how to do this when we discuss
+ <literal>SELECT ... INTO OUTFILE</literal>. For more
+ information see ...
+ </para>
+
+ <para>
+ For an XML representation of the data and the database objects
+ use the <option>--xml</option> option. This option creates an
+ XML document in the following format:
+ </para>
+
+<programlisting>
+<replaceable>
+ <?xml version="1.0"?>
+ <mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <database name="sakila">
+ <table_structure name="actor">
+ <field Field="actor_id" Type="smallint(5) unsigned" Null="NO" Key="PRI"
+ Extra="auto_increment" />
+ <field Field="first_name" Type="varchar(45)" Null="NO" Key=""
+ Default="" Extra="" />
+ <field Field="last_name" Type="varchar(45)" Null="NO" Key="MUL"
+ Default="" Extra="" />
+ <field Field="last_update" Type="timestamp" Null="NO" Key=""
+ Default="CURRENT_TIMESTAMP" Extra="" />
+ <key Table="actor" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1"
+ Column_name="actor_id" Collation="A" Cardinality="0" Null=""
+ Index_type="BTREE" Comment="" />
+ <key Table="actor" Non_unique="1" Key_name="idx_actor_last_name"
+ Seq_in_index="1" Column_name="last_name" Collation="A"
+ Cardinality="0" Null="" Index_type="BTREE" Comment="" />
+ <options Name="actor" Engine="InnoDB" Version="10" Row_format="Compact"
+ Rows="0" Avg_row_length="0" Data_length="16384" Max_data_length="0"
+ Index_length="16384" Data_free="0" Auto_increment="1"
+ Create_time="2007-04-11 19:35:58" Collation="utf8_general_ci"
+ Create_options="" Comment="InnoDB free: 10240 kB" />
+ </table_structure>
+ <table_data name="actor">
+ [table data] ...
+ </table_data>
+ [more table definitions and data] ...
+ </database>
+ </mysqldump>
+</replaceable>
+</programlisting>
+
+ <para>
+ Given the ease with which a database can be converted to XML
+ you might wonder whether conversion to HTML is also possible.
+ Unfortunately, there is no <command>mysqldump</command> option
+ for creating HTML output. However, this can be done by
+ starting <command>mysql</command> using the
+ <option>--html</option> and <option>--tee</option> options.
+ For instructions on doing this see ...
+
+ <remark>
+ xref when available
+ </remark>
+ </para>
+
+<!--Leave out? add Migration Toolkit reference? para>
+ Apart from exporting databases in various text formats, it is also
+ possible to export to other database formats such as MS SQL
+ Server, PostgreSQL, or even to convert to earlier versions of
+ MySQL. This is done using the
+ <option>– –compatible=<replaceable>name</replaceable></option>
+ option. Using this option makes a best guess at transforming MySQL
+ to the named format. However, this topic is beyond the scope of
+ this discussion. For more information see
+ <ulink url="&base-url-refman;5.0/en/mysqldump.html"/>.
+ </para-->
+
+ </section>
+
+ </section>
+
+<!-- end mysqldump section -->
+
+ <section id="user-guide-replication">
+
+ <title>Replication</title>
+
+ <para></para>
+
+ </section>
+
+ <section id="user-guide-backup-other">
+
+ <title>Other Options</title>
+
+ <para></para>
+
+ </section>
+
+ </section>
+
+<!-- END backup -->
+
+ <section>
+
+ <title>Best Practices</title>
+
+ <para></para>
+
+ </section>
+
+</chapter>
Modified: trunk/userguide/installing.xml
===================================================================
--- trunk/userguide/installing.xml 2007-08-23 18:19:59 UTC (rev 7527)
+++ trunk/userguide/installing.xml 2007-08-23 21:09:52 UTC (rev 7528)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 45; 1966 bytes
@@ -120,6 +120,37 @@
</section>
<!-- END MAC -->
+ <section>
+
+ <title>Checklist If Installer/RPM Not Used</title>
+
+ <section>
+
+ <title>Introduction</title>
+
+ <para>
+ You can skip this section if
+ </para>
+
+ </section>
+
+ <section>
+
+ <title>Sections Taken from the Reference Manual</title>
+
+ <para></para>
+
+ </section>
+
+ <section>
+
+ <title>Installing the Help Files</title>
+
+ <para></para>
+
+ </section>
+
+ </section>
</section>
@@ -132,58 +163,29 @@
<para></para>
</section>
+
<!-- END UPGRADING MYSQL -->
- <section id="installing-gui">
-
- <title>Installing the MySQL GUI Tools</title>
-
- <para></para>
-
- <section id="installing-gui-introduction">
-
- <title>Introduction</title>
-
+ <!--gui tools-->
+ <section>
+
+ <title>Using GUI Tools</title>
+
+
<para></para>
-
+
</section>
-
-<!-- END INTRODUCTION -->
-
- <section id="installing-gui-downloading">
-
- <title>Downloading the MySQL GUI Tools</title>
-
+
+ <section>
+
+ <title>MySQL Administrator</title>
+
<para></para>
-
+
</section>
+
+ <!--end gui tools-->
-<!-- END DOWNLOADING -->
-
- <section id="installing-gui-installing">
-
- <title>Installing the MySQL GUI Tools</title>
-
- <para></para>
-
- </section>
-
-<!-- END INSTALLING -->
-
- <section id="installing-gui-starting">
-
- <title>Starting the MySQL GUI Tools</title>
-
- <para></para>
-
- </section>
-
-<!-- END STARTING -->
-
- </section>
-
-<!-- END GUI -->
-
</chapter>
<!-- END INSTALLING CHAPTER -->
Modified: trunk/userguide/introduction.xml
===================================================================
--- trunk/userguide/introduction.xml 2007-08-23 18:19:59 UTC (rev 7527)
+++ trunk/userguide/introduction.xml 2007-08-23 21:09:52 UTC (rev 7528)
Changed blocks: 4, Lines Added: 85, Lines Deleted: 32; 2925 bytes
@@ -5,36 +5,6 @@
<title>Introduction</title>
- <section id="about-book">
-
- <title>About This Book</title>
-
- <para></para>
-
- <para></para>
-
- </section>
-
- <section id="introduction-what-is-rdb">
-
- <title>What is a Relational Database?</title>
-
- <para></para>
-
- </section>
-
-<!-- END WHAT IS RDB -->
-
- <section id="introduction-what-is-rdbms">
-
- <title>What is a Relational Database Management System?</title>
-
- <para></para>
-
- </section>
-
-<!-- END WHAT IS RDBMS -->
-
<section id="introduction-what-is-mysql">
<title>What is MySQL?</title>
@@ -48,7 +18,7 @@
principle. intoduction to the client/server architecture MySQL
follows the client/server architecture and as a consequence, MySQL
consists of two parts: the server and the client(s). They
- communicate over a well-defined interface but lets not describe
+ communicate over a well-defined interface but let's not describe
any more details of it. This interface simply defines the way that
the server and the client communicate with each other. The
important here is that such an interface for communication exists
@@ -82,8 +52,41 @@
programming language client the report is stored in a variable for
further manipulation with the programming language.
</remark>
-
+
+ <section>
+
+ <title>MySQL On the Web</title>
+
+ <para></para>
+
+ </section>
+
+ <section>
+
+ <title>MySQL Enterprise Applications</title>
+
+ <para></para>
+
+ </section>
+
+ <section>
+
+ <title>MySQL Desktop Applications</title>
+
+ <para></para>
+
+ </section>
+
+ <section>
+
+ <title>Main Features</title>
+
+ <para></para>
+
+ </section>
+
</section>
+
<!-- END WHAT IS MYSQL -->
@@ -96,6 +99,56 @@
</section>
<!-- END WHY USE MYSQL -->
+ <section>
+
+ <title>Example Applications</title>
+
+ <para></para>
+
+ </section>
+
+ <section>
+
+ <title>About This Book</title>
+
+ <section>
+
+ <title>Target Audience</title>
+
+ <para></para>
+
+ </section>
+
+ <section>
+
+ <title>This is Not the Manual</title>
+
+ <para></para>
+
+ </section>
+
+ </section>
+
+ <section>
+
+ <title>Version of MySQL Used</title>
+
+ <section>
+
+ <title>Operating Systems Supported</title>
+
+ <para></para>
+
+ </section>
+
+ <section>
+
+ <title>Variations Between Operating Systems</title>
+
+ <para></para>
+
+ </section>
+ </section>
</chapter>
<!-- END INTRODUCTION CHAPTER -->
Modified: trunk/userguide/mysql-client-programs.xml
===================================================================
--- trunk/userguide/mysql-client-programs.xml 2007-08-23 18:19:59 UTC (rev 7527)
+++ trunk/userguide/mysql-client-programs.xml 2007-08-23 21:09:52 UTC (rev 7528)
Changed blocks: 3, Lines Added: 35, Lines Deleted: 722; 29409 bytes
@@ -8,6 +8,34 @@
<chapter id="mysql-client-programs">
<title>MySQL Client Programs</title>
+
+ <!-- Start mysql client -->
+
+ <section id="mysql-client-intro">
+
+ <title>The MySQL Client Programs</title>
+
+ <para>
+ promised not to mention OS-specific commands but if you are
+ working on the a Unix platform you will want to refer to the
+ manual and find out more about the <command>system</command> and
+ the <command>pager</command> commands.
+ </para>
+
+ <para>
+ use of the arrow keys to retrieve commands
+ </para>
+
+ <para>
+ passing arguments at the command line is cumbersome as with other
+ utilities we'll see how common or default options can be added to
+ a configuration file
+ </para>
+
+ </section>
+
+ <!-- End mysql client -->
+
<section id="mysql-client">
@@ -543,6 +571,13 @@
files is especially useful when you have repetitive tasks to
perform. Script files are discussed in detail in <xref>.
</para>
+
+ <para>
+ An alternative to the <command>source</command> command is to
+ redirect a script file to the <command>mysql</command> command
+ from the command prompt. You can do this in the following way:
+ ...
+ </para>
<para>
To avoid having to fully qualify a table name by preceding it
@@ -951,727 +986,5 @@
<!-- end mysqladmin -->
- <section id="user-guide-mysqldump">
-
- <title>Using <command>mysqldump</command></title>
-
- <para>
- The <command>mysqldump</command> utility is a database back-up
- program capable of copying everything on a specific MySQL server
- — both the database objects and the data. It can also be
- used to copy a number of databases, one particular database, one
- or more tables from a specific database, or just specific records
- from one table. Any kind of data can be saved using this utility
- — even images stored as binary data.
- </para>
-
- <para>
- The <command>mysqldump</command> utility creates a script file of
- SQL statements that recreate the database objects selected and it
- also creates <literal>INSERT</literal> statements to restore data.
- There are various other ways to back up MySQL databases or tables;
- using the <command>mysql</command> client program and SQL
- statements, copying the MySQL data directory, using binary logs,
- using MySQL Administrator, and also the Unix-specific utility,
- <command>mysqlhotcopy</command>. However,
- <command>mysqldump</command> is the most versatile and accessible
- tool for backing up tables and databases and it is available for
- all operating systems.
- </para>
-
- <para>
- The reasons for creating back-up files vary:
-
- <itemizedlist>
-
- <listitem>
- <para>
- As replacements for existing files in the event of database
- corruption
- </para>
- </listitem>
-
- <listitem>
- <para>
- To transfer files from a development server to a production
- server
- </para>
- </listitem>
-
- <listitem>
- <para>
- To migrate to another file format
- </para>
- </listitem>
-
- </itemizedlist>
- </para>
-
- <para>
- This chapter shows how to use <command>mysqldump</command> for
- each of these tasks. This is not meant as a definite treatment of
-
- <code>mysqldump</code>
-
- ; for complete coverage of this utility see
- <ulink url="&base-url-refman;5.0/en/mysqldump.html"/>.
- </para>
-
-<!-- start options -->
-
- <section id="mysqldump-options">
-
- <title>Options</title>
-
- <para>
- This section identifies the most commonly used options and
- briefly describes each one. Examples of using these options are
- given in subsequent sections.
- </para>
-
- <para>
- Since the <command>mysqldump</command> utility gives access to a
- specific MySQL server, you must have credentials on that server;
- you must explicitly or implicitly provide a
- <option>--user</option> and <option>--password</option>.
- Likewise you must provide <option>--host</option> and
- <option>--port</option> options. In this respect,
- <command>mysqldump</command> does not differ from the MySQL
- client program, <command>mysql</command>, or from other
- utilities such as <command>mysqladmin</command>.
- </para>
-
- <para>
- Other common options are:
-
- <itemizedlist>
-
- <listitem>
- <para>
- <option>--all-databases, -A </option> – Dump all
- tables in all databases.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--databases, -B </option> – Specify this
- option and <command>mysqldump</command> regards all name
- arguments as database names
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--fields-terminated-by </option> – Used in
- conjunction with the <option>--tab</option> option to
- specify a field terminator.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--no-create-db</option> – Used in
- conjunction with the <option>--all-databases</option> or
- the <option>--databases</option> option to suppress the
- <literal>CREATE DATABASE</literal> statement
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--no-data</option> – Save database objects
- but not data.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--opt </option> – This option is shorthand
- for a group of options. See
- <xref linkend="opt-group-options"/>.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--skip-opt </option> – Turn off the
- <option>--opt</option> group of options.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--tab=<replaceable>path</replaceable>, -T
- <replaceable>path</replaceable> </option> – Create
- tab-separated data files in the named directory.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--tables </option> – Override the
- <option>--databases</option> option.
- <command>mysqldump</command> regards all name arguments
- following this option as table names.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--where=<replaceable>'where_condition'</replaceable>,
- -w <replaceable>'where_condition'</replaceable> </option>
- – Only dump rows selected by the where condition.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--xml </option> – Dump output as XML.
- </para>
- </listitem>
-
- </itemizedlist>
- </para>
-
- <para>
- The <option>--all-databases</option> option is used when you
- want to dump the entire contents of a server. On the other hand,
- the <option>--databases</option> option lets you specify
- particular databases to copy. Both of these options add a
- <literal>CREATE DATABASE</literal> statement to the dump file.
- To turn off this feature use the <option>--no-create-db</option>
- option. You can also choose not to save any data by using the
- <option>--no-data</option> option.
- </para>
-
- <para>
- The <option>--tables</option> option makes it possible to use
- the <option>--databases</option> option and also specify which
- tables you would like to dump.
- </para>
-
- <para>
- Use the <option>--tab</option> and
- <option>--fields-terminated-by</option> options, to dump a
- database in a variety of text formats. For XML format, use the
- <option>--xml</option> option. To select only specific rows from
- a table use the <option>--where</option> option.
- </para>
-
- <para>
- For a complete list of all the available options see
- <ulink url="&base-url-refman;5.0/en/mysqldump.html"/>.
- </para>
-
- <section id="opt-group-options">
-
- <title>The <option>--opt</option> Group of Options</title>
-
- <para>
- The <option>--opt</option> option is on by default so you
- don't have to specify it. However, you do need to know what it
- does. Using <option>--opt</option> is shorthand for specifying
- <option> --add-locks, --add-drop-table, --create-options,
- --disable-keys, --extended-insert, --lock-tables,
- --quick,</option> and <option>--set-charset</option>. Find a
- brief description of these options in what follows.
-
- <itemizedlist>
-
- <listitem>
- <para>
- <option>--add-locks </option> – Lock tables before
- inserting data.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--add-drop-table </option> – Remove tables
- before recreating them.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--create-options </option> – Include all
- MySQL-specific table options in the <literal>CREATE
- TABLE</literal> statements.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--disable-keys </option> – Improve speed
- by disabling indexes before inserting data. (Applies
- only to MyISAM tables and only to non-unique indexes.)
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--extended-insert </option> – Use
- multiple-row <literal>INSERT</literal> syntax that
- includes a <literal>VALUES</literal> list for each row.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--lock-tables </option> – Lock tables
- before dumping them.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--quick </option> – Retrieve rows from a
- table one row at a time, reducing demands on memory.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <option>--set-charset</option> – Add <literal>SET
- NAMES</literal>
- <replaceable>default_character_set</replaceable> to the
- output.
- </para>
- </listitem>
-
- </itemizedlist>
- </para>
-
- <para>
- Each of these options can be turned off individually by using
- the
- <option>--skip-<replaceable>option-name</replaceable></option>
- syntax. For example, if you want to ensure that you recreate
- tables as the server default table type, you can turn off
- <option>--create-options</option> by specifying
- <option>--skip-create-options</option>. No engine or character
- set will be specified in the <literal>CREATE TABLE</literal>
- statement. Turn off <option>--extended-insert</option> by
- specifying the <option>--skip-extended-inserts</option>
- option. Doing this creates a separate
- <literal>INSERT</literal> statement for each row, making it
- much easier to remove individual <literal>INSERT</literal>
- statements.
- </para>
-
- </section>
-
- </section>
-
-<!-- back-up -->
-
- <section id="backing-up">
-
- <title>Backing Up Data and Database Objects</title>
-
- <para>
- To back up the contents of a server and create replacements for
- all existing databases invoke the <command>mysqldump</command>
- utility specifying your credentials and the
- <option>--all-databases</option> option. Using the option short
- forms, you can back up a server and redirect output to a file in
- the following way:
- </para>
-
-<programlisting>
-shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p -A > <replaceable>dump.sql</replaceable></userinput>
-</programlisting>
-
- <para>
- Using the short forms shown in the preceding listing is
- equivalent to using the <option>--user, --password,</option> and
- <option>--all-databases</option> options. Output is sent to a
- file using the redirection operator,
- ‘<literal>></literal>’. Since the
- <option>--host</option> option is not specified, it defaults to
- <literal>localhost</literal>. Likewise, <option>--port</option>
- will default to <literal>3306</literal>. Since no password is
- given at the command line, you will be prompted for one.
- </para>
-
- <para>
- Specifying your password at the command line is allowed but note
- that you cannot leave a space between the option and your
- password; it must appear as
- <option>-p<replaceable>password</replaceable></option>. If a
- space was allowed, the <option>-A</option> option in the
- preceding listing would be interpreted as the password.
- </para>
-
- <para>
- If you wish to copy only specific databases, replace
- <option>-A</option> with the <option>--databases</option> option
- (or its short form, <option>-B</option>) followed by the names
- of the databases that you wish to back up. The file created by
- this command will contain only the databases specified.
- </para>
-
- <para>
- Using <command>mysqldump</command> to back up specific databases
- or all the databases on a server is an easy way to create
- replacements in the event of lost data or database corruption.
- </para>
-
- <section id="refining-objects-selected">
-
- <title>Further Refining the Objects and Data Selected</title>
-
- <para>
- If you wish to copy only one database, you do not need to use
- the <option>--databases</option> option. Simply specify your
- credentials and the database name in the following fashion:
- </para>
-
-<programlisting>
-shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p <replaceable>db_name</replaceable> > <replaceable>dump.sql</replaceable></userinput>
-</programlisting>
-
- <para>
- A specific database is selected by using the database name
- — no option is necessary. Output is again redirected to
- the file using the redirection operator.
- </para>
-
- <para>
- Remember that the <option>--opt</option> group of options is
- on by default. (For a complete list of this group of options
- see <xref linkend="opt-group-options"/>.) To turn off any one
- of these options you can use the
- <option>--skip-<replaceable>option-name</replaceable></option>
- option.
- </para>
-
- <para>
- On the other hand, if you want to turn off most of the
- <option>--opt</option> options, it may be easier to specify
- <option>--skip-opt</option> and then list the options you wish
- to use.
- </para>
-
- <note>
- <para>
- If you choose to do things this way, make sure that you
- specify <option>--skip-opt</option> first. If it is the last
- option specified, it will turn off any of the
- <option>--opt</option> group of options that precede it.
- </para>
- </note>
-
- <para>
- In some cases you may want to copy only selected tables from a
- database. This is done by naming the desired tables
- immediately following the database name. For example:
- </para>
-
-<programlisting>
-shell> <userinput>mysqldump <replaceable>[options]</replaceable> <replaceable>db_name table1 table2</replaceable></userinput>
-</programlisting>
-
- <para>
- When dumping a specific table, the data selection can be
- further refined by adding a <option>--where</option> option in
- the following way:
- </para>
-
-<programlisting>
-shell> <userinput>mysqldump [options] <replaceable>db_name table1</replaceable> --where=<replaceable>'field_name>1000'</replaceable></userinput>
-</programlisting>
-
- <para>
- When using the <option>--where</option> option only one table
- may be specified. The script file created will contain a
- <literal>CREATE TABLE</literal> statement for reconstructing
- the table and any data that meets the condition specified
- using the <option>--where</option> option.
- </para>
-
- <note>
- <para>
- If the <option>--where</option> option contains spaces or
- characters special to your command interpreter, then you
- must enclose everything in the where condition in quotation
- marks.
- </para>
- </note>
-
- <para>
- Using a database name at the command line creates a copy of
- the tables and the data from the specified database. However,
- no database is created when this syntax is used.
- </para>
-
- <para>
- To dump only one database and add a <literal>CREATE
- DATABASE</literal> statement, you must use the
- <option>--databases</option> option. An example using the
- short form of the <option>--databases</option> option follows:
- </para>
-
-<programlisting>
-shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p -B <replaceable>db_name</replaceable> > <replaceable>dump.sql</replaceable></userinput>
-</programlisting>
-
- <para>
- If you wish your dump file to contain a <literal>CREATE
- DATABASE</literal> statement and you only wish to dump
- selected tables use the <option>--tables</option> option as
- shown in the following:
- </para>
-
-<programlisting>
-shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p -B <replaceable>db_name</replaceable> <option>--tables <replaceable>table1</replaceable></option> > <replaceable>dump.sql</replaceable></userinput>
-</programlisting>
-
- <para>
- If you don't specify the <option>--tables</option> option, the
- <option>-B</option> option interprets each name as a database.
- </para>
-
- <para>
- The next section examines how to restore databases from the
- script files created by <command>mysqldump</command>.
- </para>
-
- </section>
-
- </section>
-
- <section id="restoring-database-dumps">
-
- <title>Restoring Database Dumps</title>
-
- <para>
- Databases are restored by redirecting the script file to the
- <command>mysql</command> client program.
-
- <remark>
- xref here?
- </remark>
-
- If the script file was created using either the
- <option>-A</option> or <option>-B</option> options, restore the
- dumped files in the following way:
- </para>
-
-<programlisting>
-shell> <userinput>mysql -u <replaceable>user_name</replaceable> -p < <replaceable>dump.sql</replaceable></userinput>
-</programlisting>
-
- <warning>
- <para>
- Using the <option>-A</option> or <option>-B</option> option
- with <command>mysqldump</command> creates a script that drops
- and recreates databases. Any data in existing databases will
- be lost. Furthermore, if you backed up all databases then the
- <literal>mysql</literal> database will be overwritten. Be sure
- that this is what you intend. For more information see ...
-
- <remark>
- xref here
- </remark>
- </para>
- </warning>
-
- <para>
- If you created your dump file without using the
- <option>-A</option> or <option>-B</option> options, then the
- database that you copy the tables to must already exist. Name
- that database when invoking <command>mysql</command>:
- </para>
-
-<programlisting>
-shell> <userinput>mysql -u <replaceable>user_name</replaceable> -p <replaceable>db_name</replaceable> < <replaceable>dump.sql</replaceable></userinput>
-</programlisting>
-
- <para>
- In this case, you need not worry about overwriting an existing
- database, but you will overwrite any tables in the existing
- database that have the same names as tables in the back-up file
- if the file contains <literal>DROP TABLE</literal> and
- <literal>CREATE TABLE</literal> statements. To remove these
- statements from a dump file, create it using the
- <option>--skip-add-drop-table</option> and
- <option>--no-create-info</option> options.
- </para>
-
- <para>
- If you are uploading a database dump file to a remote database
- then you will have to specify the <option>--host</option>
- option. If you don't have access to your MySQL server from a
- remote location, copy your script file to the server, log in
- using <command>ssh</command>, and then run
- <command>mysql</command>. If neither of these options is
- available to you, you may be able to upload and execute the
- script file using a program such as phpMyAdmin.
- </para>
-
- </section>
-
-<!-- Start Exporting -->
-
- <section id="exporting-from-mysql">
-
- <title>Exporting From MySQL</title>
-
- <para>
- To use the data from a MySQL database in another application
- — a word processor or a spreadsheet, for example —
- you might want to export data in text format. The most common
- way of exporting a file in text format is by using the
- <option>--tab</option> or <option>-T</option> option and
- specifying the full pathname to the target directory:
- </para>
-
-<programlisting>
-shell> <userinput>mysqldump -u <replaceable>user_name</replaceable> -p <replaceable>db_name</replaceable> -T <replaceable>/tmp</replaceable></userinput>
-</programlisting>
-
- <para>
- Dumping a database specifying this option creates
- a script file of each table's structure using the table name
- and the extension <literal>sql</literal> as the file name and a tab-separated
- file of each table's data using the table name and the extension
- <literal>txt</literal> as the file name. These files are created in the directory
- specified with the <option>-T</option> option. This directory
- must be writable and the user indicated by
- <replaceable>user_name</replaceable> must have the
- <literal>FILE</literal> privilege. For more information about
- the <literal>FILE</literal> privilege see ...
-
- <remark>
- Add xref to FILE here
- </remark>
- </para>
-
- <para>
- File permissions are not usually a problem on Windows systems
- but the file separator and spaces in file names can present
- difficulties. Use a forward slash to separate directories and,
- if a directory contains spaces, enclose the path in quotation
- marks, for example, <quote>C:/Documents and
- Settings/peter/Desktop/</quote>. Failure to include quotation
- marks results in the following error:
- </para>
-
-<programlisting>
-mysqldump: Got error: 1049; Unknown database 'and' when selecting the database
-</programlisting>
-
- <para>
- Despite its name, the <option>--tab</option> option can be used
- to created files with a field terminator other than the
- <literal>tab</literal> character. The field terminator is
- changed by using the <option>--fields-terminated-by</option>
- option. For example you can specify a
- ‘<literal>,</literal>’ as the terminator in order to
- use a table in a spreadsheet program.
- </para>
-
- <para>
- The <option>--tab</option> option is designed to extract data
- from one database only and cannot be used with the
- <option>--databases</option> option, or with the
- <option>--all-databases</option> option. Whenever it is used a
- database name must be one of the arguments to
- <command>mysqldump</command>.
- </para>
-
- <para>
- To further refine the data selected, the <option>--tab</option>
- option can also be used to select data from one table only. This
- is done by naming the desired table after selecting the
- database. The <option>--tab</option> option can also be used
- with the <option>--where</option> option as shown in
- <xref linkend="refining-objects-selected"/>.
- </para>
-
- <para>
- Often, when creating text files there is no need for the script
- file that creates the table structure — you're simply
- interested in exporting the data. In cases like this it would be
- nice to have an option to copy only data. No such option exists
- but we will see how to do this when we discuss <literal>SELECT
- ... INTO OUTFILE</literal>. For more information see ...
- </para>
-
- <para>
- For an XML representation of the data and the database objects
- use the <option>--xml</option> option. This option creates an
- XML document in the following format:
- </para>
-
-<programlisting>
-<replaceable>
- <?xml version="1.0"?>
- <mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <database name="sakila">
- <table_structure name="actor">
- <field Field="actor_id" Type="smallint(5) unsigned" Null="NO" Key="PRI"
- Extra="auto_increment" />
- <field Field="first_name" Type="varchar(45)" Null="NO" Key=""
- Default="" Extra="" />
- <field Field="last_name" Type="varchar(45)" Null="NO" Key="MUL"
- Default="" Extra="" />
- <field Field="last_update" Type="timestamp" Null="NO" Key=""
- Default="CURRENT_TIMESTAMP" Extra="" />
- <key Table="actor" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1"
- Column_name="actor_id" Collation="A" Cardinality="0" Null=""
- Index_type="BTREE" Comment="" />
- <key Table="actor" Non_unique="1" Key_name="idx_actor_last_name"
- Seq_in_index="1" Column_name="last_name" Collation="A"
- Cardinality="0" Null="" Index_type="BTREE" Comment="" />
- <options Name="actor" Engine="InnoDB" Version="10" Row_format="Compact"
- Rows="0" Avg_row_length="0" Data_length="16384" Max_data_length="0"
- Index_length="16384" Data_free="0" Auto_increment="1"
- Create_time="2007-04-11 19:35:58" Collation="utf8_general_ci"
- Create_options="" Comment="InnoDB free: 10240 kB" />
- </table_structure>
- <table_data name="actor">
- [table data] ...
- </table_data>
- [more table definitions and data] ...
- </database>
- </mysqldump>
-</replaceable>
-</programlisting>
-
- <para>
- Given the ease with which a database can be converted to XML you
- might wonder whether conversion to HTML is also possible.
- Unfortunately, there is no <command>mysqldump</command> option
- for creating HTML output. However, this can be done by starting
- <command>mysql</command> using the <option>--html</option> and
- <option>--tee</option> options. For instructions on doing this
- see ...
-
- <remark>
- xref when available
- </remark>
- </para>
-
-<!--Leave out? add Migration Toolkit reference? para>
- Apart from exporting databases in various text formats, it is also
- possible to export to other database formats such as MS SQL
- Server, PostgreSQL, or even to convert to earlier versions of
- MySQL. This is done using the
- <option>– –compatible=<replaceable>name</replaceable></option>
- option. Using this option makes a best guess at transforming MySQL
- to the named format. However, this topic is beyond the scope of
- this discussion. For more information see
- <ulink url="&base-url-refman;5.0/en/mysqldump.html"/>.
- </para-->
-
- </section>
-
- </section>
-
-<!-- end mysqldump section -->
-
</chapter>
<!-- END mysql client programmes CHAPTER -->
Modified: trunk/userguide/mysql-server-programs.xml
===================================================================
--- trunk/userguide/mysql-server-programs.xml 2007-08-23 18:19:59 UTC (rev 7527)
+++ trunk/userguide/mysql-server-programs.xml 2007-08-23 21:09:52 UTC (rev 7528)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 632 bytes
@@ -179,7 +179,7 @@
this window, go to the <literal>Control Panel</literal> and find
<literal>Administrative Tools</literal>. Double click this icon
and then choose <literal>Services</literal>. Find the MySQL entry,
- select it, and stop the service.
+ select it, and stop the service. Also menu item ...
</para>
<para>
Modified: trunk/userguide/querying.xml
===================================================================
--- trunk/userguide/querying.xml 2007-08-23 18:19:59 UTC (rev 7527)
+++ trunk/userguide/querying.xml 2007-08-23 21:09:52 UTC (rev 7528)
Changed blocks: 1, Lines Added: 26, Lines Deleted: 0; 672 bytes
@@ -80,6 +80,32 @@
</section>
<!-- END LIMIT -->
+
+ <!--joins-->
+
+ <section>
+
+ <title>Joins</title>
+
+ <section>
+
+ <title>Keys</title>
+
+ <para></para>
+
+ </section>
+
+ <section>
+
+ <title>Foreign Keys</title>
+
+ <para></para>
+
+ </section>
+
+ </section>
+
+ <!--end joins-->
</section>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r7528 - trunk/userguide | plavin | 23 Aug |