MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:martin.brown Date:September 30 2009 2:59pm
Subject:svn commit - mysqldoc@docsrva: r16871 - in trunk: administrator dynamic-docs/faq guibook mysqltest refman-5.1 refman-5.1-maria topic-guides/topics-5.1...
View as plain text  
Author: mcbrown
Date: 2009-09-30 16:59:03 +0200 (Wed, 30 Sep 2009)
New Revision: 16871

Log:
Initial rework and restructure of the installation chapter
Splitting out the chapter into multiple files for easier management



Added:
   trunk/refman-5.1/installing-aix.xml
   trunk/refman-5.1/installing-bsd.xml
   trunk/refman-5.1/installing-core.xml
   trunk/refman-5.1/installing-envvar.xml
   trunk/refman-5.1/installing-general.xml
   trunk/refman-5.1/installing-generic-binary.xml
   trunk/refman-5.1/installing-hpux.xml
   trunk/refman-5.1/installing-i5os.xml
   trunk/refman-5.1/installing-linux.xml
   trunk/refman-5.1/installing-macosx.xml
   trunk/refman-5.1/installing-perl.xml
   trunk/refman-5.1/installing-postinstall.xml
   trunk/refman-5.1/installing-solaris.xml
   trunk/refman-5.1/installing-source-core.xml
   trunk/refman-5.1/installing-updowngrade.xml
   trunk/refman-5.1/installing-windows.xml
   trunk/topic-guides/topics-5.1/mysql-reslimits-excerpt-aspec.xml
   trunk/topic-guides/topics-5.1/mysql-reslimits-excerpt-base.xml
Removed:
   trunk/refman-5.1/installing-core-new-tmp.xml
   trunk/refman-5.1/installing-core.xml
Renamed/Moved:
   trunk/refman-5.1/installing.xml (from rev 16868, trunk/refman-5.1/installing-core.xml)
Modified:
   trunk/administrator/Makefile.depends
   trunk/dynamic-docs/faq/mysql-security.xml
   trunk/dynamic-docs/faq/mysql.xml
   trunk/guibook/Makefile.depends
   trunk/mysqltest/Makefile.depends
   trunk/refman-5.1-maria/Makefile.depends
   trunk/refman-5.1/Makefile.depends
   trunk/refman-5.1/manual.xml
   trunk/refman-5.1/renamed-nodes.txt
   trunk/topic-guides/topics-5.1/Makefile
   trunk/topic-guides/topics-5.1/Makefile.depends
   trunk/topic-guides/topics-5.1/mysql-installation-excerpt-aspec.xml


Modified: trunk/administrator/Makefile.depends
===================================================================
--- trunk/administrator/Makefile.depends	2009-09-30 10:42:07 UTC (rev 16870)
+++ trunk/administrator/Makefile.depends	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 2, Lines Added: 2, Lines Deleted: 2; 1083 bytes

@@ -98,7 +98,7 @@
 	../refman-5.1/metadata/dba-privilege-system.idmap \
 	../refman-5.1/metadata/dba-user-management-core.idmap \
 	../refman-5.1/metadata/errors-problems-core.idmap \
-	../refman-5.1/metadata/installing-core.idmap \
+	../refman-5.1/metadata/installing-windows.idmap \
 	../refman-5.1/metadata/optimization.idmap \
 	../refman-5.1/metadata/programs-client-core.idmap \
 	../refman-5.1/metadata/programs-using.idmap \

@@ -417,7 +417,7 @@
 service_control_IDMAPS = \
 	../refman-5.1/metadata/dba-multiple-servers.idmap \
 	../refman-5.1/metadata/dba-mysqld-server-core.idmap \
-	../refman-5.1/metadata/installing-core.idmap \
+	../refman-5.1/metadata/installing-windows.idmap \
 	../refman-5.1/metadata/storage-engines-core.idmap \
 	metadata/connection-dialog.idmap
 service-control.validpure: $(service_control_SOURCES)


Modified: trunk/dynamic-docs/faq/mysql-security.xml
===================================================================
--- trunk/dynamic-docs/faq/mysql-security.xml	2009-09-30 10:42:07 UTC (rev 16870)
+++ trunk/dynamic-docs/faq/mysql-security.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 0, Lines Deleted: 6; 552 bytes

@@ -81,12 +81,6 @@
 
           <listitem>
             <para>
-              <xref linkend="selinux"/>.
-            </para>
-          </listitem>
-
-          <listitem>
-            <para>
               <xref linkend="secure-basics"/>.
             </para>
           </listitem>


Modified: trunk/dynamic-docs/faq/mysql.xml
===================================================================
--- trunk/dynamic-docs/faq/mysql.xml	2009-09-30 10:42:07 UTC (rev 16870)
+++ trunk/dynamic-docs/faq/mysql.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 2, Lines Added: 33, Lines Deleted: 6; 1374 bytes

@@ -234,6 +234,39 @@
     </faqanswer>
 
   </faqentry>
+
+  <faqentry sequence="71">
+
+    <tags type="general"/>
+    <versions>
+      <manual version="5.0"/>
+      <manual version="5.1"/>
+      <manual version="5.4"/>
+      <manual version="6.0"/>
+    </versions>
+    <faqquestion>
+
+      <para>
+        Why do I see multiple processes for <literal>mysqld</literal>?
+      </para>
+
+    </faqquestion>
+    <faqanswer>
+
+        <para>
+          When using LinuxThreads, you should see a minimum of three
+          <command>mysqld</command> processes running. These are in fact
+          threads. There is one thread for the LinuxThreads manager, one
+          thread to handle connections, and one thread to handle alarms
+          and signals.
+        </para>
+
+    </faqanswer>
+
+  </faqentry>
+
+
+
   <faqentry sequence="80">
 
     <tags type="general"/>

@@ -2752,12 +2785,6 @@
 
           <listitem>
             <para>
-              <xref linkend="selinux"/>.
-            </para>
-          </listitem>
-
-          <listitem>
-            <para>
               <xref linkend="secure-basics"/>.
             </para>
           </listitem>


Modified: trunk/guibook/Makefile.depends
===================================================================
--- trunk/guibook/Makefile.depends	2009-09-30 10:42:07 UTC (rev 16870)
+++ trunk/guibook/Makefile.depends	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 673 bytes

@@ -223,7 +223,7 @@
 	../refman-5.1/metadata/dba-privilege-system.idmap \
 	../refman-5.1/metadata/dba-user-management-core.idmap \
 	../refman-5.1/metadata/errors-problems-core.idmap \
-	../refman-5.1/metadata/installing-core.idmap \
+	../refman-5.1/metadata/installing-windows.idmap \
 	../refman-5.1/metadata/optimization.idmap \
 	../refman-5.1/metadata/programs-client-core.idmap \
 	../refman-5.1/metadata/programs-using.idmap \


Modified: trunk/mysqltest/Makefile.depends
===================================================================
--- trunk/mysqltest/Makefile.depends	2009-09-30 10:42:07 UTC (rev 16870)
+++ trunk/mysqltest/Makefile.depends	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 2, Lines Added: 2, Lines Deleted: 2; 881 bytes

@@ -74,7 +74,7 @@
 mysqltest_IMAGES =
 mysqltest_SOURCES = mysqltest.xml $(mysqltest_INCLUDES)
 mysqltest_IDMAPS = \
-	../refman-5.1/metadata/installing-core.idmap \
+	../refman-5.1/metadata/installing-source-core.idmap \
 	metadata/command-reference.idmap \
 	metadata/programs.idmap \
 	metadata/writing-tests.idmap

@@ -108,7 +108,7 @@
 programs_IMAGES =
 programs_SOURCES = programs.xml $(programs_INCLUDES)
 programs_IDMAPS = \
-	../refman-5.1/metadata/installing-core.idmap \
+	../refman-5.1/metadata/installing-source-core.idmap \
 	metadata/command-reference.idmap \
 	metadata/writing-tests.idmap
 programs.validpure: $(programs_SOURCES)


Modified: trunk/refman-5.1/Makefile.depends
===================================================================
--- trunk/refman-5.1/Makefile.depends	2009-09-30 10:42:07 UTC (rev 16870)
+++ trunk/refman-5.1/Makefile.depends	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 44, Lines Added: 639, Lines Deleted: 103; 45080 bytes

@@ -47,7 +47,7 @@
 apis_libmysqld_SOURCES = apis-libmysqld.xml $(apis_libmysqld_INCLUDES)
 apis_libmysqld_IDMAPS = \
 	metadata/apis-c.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/programs-using.idmap
 apis-libmysqld.validpure: $(apis_libmysqld_SOURCES)
 apis-libmysqld.titles: $(apis_libmysqld_SOURCES)

@@ -465,7 +465,8 @@
 	metadata/dba-user-management-core.idmap \
 	metadata/errors-problems-core.idmap \
 	metadata/functions-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-perl.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/internationalization.idmap \
 	metadata/language-structure-core.idmap \
 	metadata/optimization.idmap \

@@ -571,7 +572,8 @@
 	metadata/apis-c.idmap \
 	metadata/dba-log-files.idmap \
 	metadata/dba-multiple-servers.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-windows.idmap \
 	metadata/programs-server-core.idmap \
 	metadata/programs-using.idmap
 dba-multiple-servers.validpure: $(dba_multiple_servers_SOURCES)

@@ -614,7 +616,8 @@
 	metadata/dba-user-management-core.idmap \
 	metadata/errors-problems-core.idmap \
 	metadata/functions-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-postinstall.idmap \
 	metadata/optimization.idmap \
 	metadata/programs-installation.idmap \
 	metadata/programs-using.idmap \

@@ -1273,7 +1276,7 @@
 	metadata/extending-mysql.idmap \
 	metadata/faqs-core.idmap \
 	metadata/functions-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/internationalization.idmap \
 	metadata/introduction.idmap \
 	metadata/language-structure-core.idmap \

@@ -1327,7 +1330,7 @@
 	metadata/dba-user-management-core.idmap \
 	metadata/extending-mysql.idmap \
 	metadata/faqs-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-postinstall.idmap \
 	metadata/optimization.idmap \
 	metadata/sql-syntax-server-administration.idmap
 dynxml-local-dba-security.validpure: $(dynxml_local_dba_security_SOURCES)

@@ -1362,7 +1365,8 @@
 	metadata/dba-user-management-core.idmap \
 	metadata/errors-problems-core.idmap \
 	metadata/functions-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-postinstall.idmap \
 	metadata/programs-client-core.idmap \
 	metadata/programs-installation.idmap \
 	metadata/programs-using.idmap \

@@ -1395,6 +1399,7 @@
 dynxml_local_errors_problems_IMAGES =
 dynxml_local_errors_problems_SOURCES = dynxml-local-errors-problems.xml $(dynxml_local_errors_problems_INCLUDES)
 dynxml_local_errors_problems_IDMAPS = \
+	../refman-5.4/metadata/installing-core.idmap \
 	../refman-common/metadata/bug-reports.idmap \
 	metadata/apis-c.idmap \
 	metadata/dba-log-files.idmap \

@@ -1405,7 +1410,9 @@
 	metadata/dba.idmap \
 	metadata/errors-problems-core.idmap \
 	metadata/extending-mysql.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/internationalization.idmap \
 	metadata/mysql-cluster-configuration-core.idmap \
 	metadata/programs-admin-util-core.idmap \

@@ -1465,7 +1472,8 @@
 	metadata/extending-mysql.idmap \
 	metadata/faqs-core.idmap \
 	metadata/information-schema.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/internationalization.idmap \
 	metadata/mysql-cluster-configuration-core.idmap \
 	metadata/mysql-cluster-management.idmap \

@@ -1525,7 +1533,7 @@
 	metadata/errors-problems-core.idmap \
 	metadata/extending-mysql.idmap \
 	metadata/functions-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/internationalization.idmap \
 	metadata/language-structure-core.idmap \
 	metadata/optimization.idmap \

@@ -1548,9 +1556,7 @@
 dynxml-local-functions-manprepped.xml: $(dynxml_local_functions_SOURCES) $(dynxml_local_functions_IDMAPS)
 dynxml-local-functions-remprepped.xml: $(dynxml_local_functions_SOURCES) $(dynxml_local_functions_IDMAPS)
 dynxml-local-functions.xml: $(dynxml_local_functions_INCLUDES)
-dynxml_local_installing_INCLUDES = \
-	../../mysqldoc/dynamic-docs/build-configure/mysqld.xml \
-	../../mysqldoc/dynamic-docs/metadata-titles.en.xml \
+dynxml_local_installing_source_INCLUDES = \
 	../common/fixedchars.ent \
 	../common/phrases.ent \
 	../gui-common/gui-common.ent \

@@ -1558,78 +1564,42 @@
 	../mysql-monitor-common/enterprise.ent \
 	../refman-common/urls.ent \
 	all-entities.ent \
-	images/published/mysql-cfg-fig1.png \
-	images/published/mysql-cfg-fig10.png \
-	images/published/mysql-cfg-fig2.png \
-	images/published/mysql-cfg-fig3.png \
-	images/published/mysql-cfg-fig4.png \
-	images/published/mysql-cfg-fig5.png \
-	images/published/mysql-cfg-fig6.png \
-	images/published/mysql-cfg-fig7.png \
-	images/published/mysql-cfg-fig8.png \
-	images/published/mysql-cfg-fig9.png \
-	installing-core.xml \
 	versions.ent
-dynxml_local_installing_IMAGES = \
-	images/published/mysql-cfg-fig1.png \
-	images/published/mysql-cfg-fig10.png \
-	images/published/mysql-cfg-fig2.png \
-	images/published/mysql-cfg-fig3.png \
-	images/published/mysql-cfg-fig4.png \
-	images/published/mysql-cfg-fig5.png \
-	images/published/mysql-cfg-fig6.png \
-	images/published/mysql-cfg-fig7.png \
-	images/published/mysql-cfg-fig8.png \
-	images/published/mysql-cfg-fig9.png
-dynxml_local_installing_SOURCES = dynxml-local-installing.xml $(dynxml_local_installing_INCLUDES)
-dynxml_local_installing_IDMAPS = \
+dynxml_local_installing_source_IMAGES =
+dynxml_local_installing_source_SOURCES = dynxml-local-installing-source.xml $(dynxml_local_installing_source_INCLUDES)
+dynxml_local_installing_source_IDMAPS = \
+	../refman-5.4/metadata/installing-core.idmap \
 	../refman-common/metadata/bug-reports.idmap \
-	../refman-common/metadata/connector-net-core.idmap \
-	../refman-common/metadata/connector-odbc.idmap \
 	../refman-common/metadata/information-sources.idmap \
 	metadata/apis-c.idmap \
-	metadata/backup.idmap \
-	metadata/data-types.idmap \
-	metadata/dba-log-files.idmap \
-	metadata/dba-multiple-servers.idmap \
 	metadata/dba-mysqld-server-core.idmap \
-	metadata/dba-privilege-system.idmap \
-	metadata/dba-security-core.idmap \
 	metadata/dba-user-management-core.idmap \
 	metadata/errors-problems-core.idmap \
 	metadata/extending-mysql.idmap \
-	metadata/faqs-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-perl.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-windows.idmap \
 	metadata/internationalization.idmap \
-	metadata/language-structure-core.idmap \
-	metadata/mysql-cluster-configuration-core.idmap \
-	metadata/mysql-cluster-multi-computer.idmap \
-	metadata/mysql-cluster-programs-core.idmap \
-	metadata/news-5.1-core.idmap \
-	metadata/news.idmap \
 	metadata/optimization.idmap \
 	metadata/programs-admin-util-core.idmap \
-	metadata/programs-client-core.idmap \
 	metadata/programs-installation.idmap \
 	metadata/programs-server-core.idmap \
 	metadata/programs-using.idmap \
-	metadata/replication-notes.idmap \
-	metadata/restrictions.idmap \
 	metadata/se-innodb-core.idmap \
-	metadata/se-myisam-core.idmap \
-	metadata/sql-syntax-compound-statements.idmap \
-	metadata/sql-syntax-data-definition.idmap \
-	metadata/sql-syntax-replication.idmap \
 	metadata/sql-syntax-server-administration.idmap
-dynxml-local-installing.validpure: $(dynxml_local_installing_SOURCES)
-dynxml-local-installing.titles: $(dynxml_local_installing_SOURCES)
-dynxml-local-installing.useless: $(dynxml_local_installing_SOURCES)
-dynxml-local-installing.valid: $(dynxml_local_installing_SOURCES) $(dynxml_local_installing_IDMAPS)
-dynxml-local-installing.validwarn: $(dynxml_local_installing_SOURCES) $(dynxml_local_installing_IDMAPS)
-dynxml-local-installing-prepped.xml: $(dynxml_local_installing_SOURCES) $(dynxml_local_installing_IDMAPS)
-dynxml-local-installing-manprepped.xml: $(dynxml_local_installing_SOURCES) $(dynxml_local_installing_IDMAPS)
-dynxml-local-installing-remprepped.xml: $(dynxml_local_installing_SOURCES) $(dynxml_local_installing_IDMAPS)
-dynxml-local-installing.xml: $(dynxml_local_installing_INCLUDES)
+dynxml-local-installing-source.validpure: $(dynxml_local_installing_source_SOURCES)
+dynxml-local-installing-source.titles: $(dynxml_local_installing_source_SOURCES)
+dynxml-local-installing-source.useless: $(dynxml_local_installing_source_SOURCES)
+dynxml-local-installing-source.valid: $(dynxml_local_installing_source_SOURCES) $(dynxml_local_installing_source_IDMAPS)
+dynxml-local-installing-source.validwarn: $(dynxml_local_installing_source_SOURCES) $(dynxml_local_installing_source_IDMAPS)
+dynxml-local-installing-source-prepped.xml: $(dynxml_local_installing_source_SOURCES) $(dynxml_local_installing_source_IDMAPS)
+dynxml-local-installing-source-manprepped.xml: $(dynxml_local_installing_source_SOURCES) $(dynxml_local_installing_source_IDMAPS)
+dynxml-local-installing-source-remprepped.xml: $(dynxml_local_installing_source_SOURCES) $(dynxml_local_installing_source_IDMAPS)
+dynxml-local-installing-source.xml: $(dynxml_local_installing_source_INCLUDES)
 dynxml_local_language_structure_INCLUDES = \
 	../../mysqldoc/dynamic-docs/metadata-titles.en.xml \
 	../../mysqldoc/dynamic-docs/reserved-words/mysql-5.0.10-beta \

@@ -2153,7 +2123,7 @@
 	../ndbapi/metadata/struct-recordspecification.idmap \
 	metadata/data-types.idmap \
 	metadata/dba-mysqld-server-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/introduction.idmap \
 	metadata/mysql-cluster-configuration-core.idmap \
 	metadata/mysql-cluster-management.idmap \

@@ -2252,7 +2222,8 @@
 	metadata/extending-mysql.idmap \
 	metadata/functions-core.idmap \
 	metadata/information-schema.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/internationalization.idmap \
 	metadata/introduction.idmap \
 	metadata/language-structure-core.idmap \

@@ -2314,7 +2285,8 @@
 	metadata/dba-mysqld-server-core.idmap \
 	metadata/dba-security-core.idmap \
 	metadata/dba-user-management-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-perl.idmap \
 	metadata/internationalization.idmap \
 	metadata/optimization.idmap \
 	metadata/programs-admin-util-core.idmap \

@@ -2357,7 +2329,7 @@
 	metadata/dba-mysqld-server-core.idmap \
 	metadata/dba-user-management-core.idmap \
 	metadata/events.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/internationalization.idmap \
 	metadata/optimization.idmap \
 	metadata/programs-admin-util-core.idmap \

@@ -2398,6 +2370,9 @@
 	metadata/dba-privilege-system.idmap \
 	metadata/dba-security-core.idmap \
 	metadata/installing-core.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-postinstall.idmap \
 	metadata/programs-admin-util-core.idmap \
 	metadata/programs-server-core.idmap \
 	metadata/programs-using.idmap

@@ -2442,6 +2417,7 @@
 	metadata/functions-core.idmap \
 	metadata/information-schema.idmap \
 	metadata/installing-core.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/internationalization.idmap \
 	metadata/news.idmap \
 	metadata/optimization.idmap \

@@ -2572,7 +2548,7 @@
 	metadata/dba-log-files.idmap \
 	metadata/dba-mysqld-server-core.idmap \
 	metadata/errors-problems-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/optimization.idmap \
 	metadata/programs-using.idmap \
 	metadata/se-innodb-core.idmap \

@@ -2636,7 +2612,7 @@
 	metadata/dba-multiple-servers.idmap \
 	metadata/dba-mysqld-server-core.idmap \
 	metadata/errors-problems-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/internationalization.idmap \
 	metadata/optimization.idmap \
 	metadata/programs-admin-util-core.idmap \

@@ -2697,7 +2673,8 @@
 	metadata/dba-mysqld-server-core.idmap \
 	metadata/errors-problems-core.idmap \
 	metadata/faqs-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-windows.idmap \
 	metadata/internationalization.idmap \
 	metadata/language-structure-core.idmap \
 	metadata/mysql-cluster.idmap \

@@ -2814,6 +2791,7 @@
 extending_mysql_IMAGES =
 extending_mysql_SOURCES = extending-mysql.xml $(extending_mysql_INCLUDES)
 extending_mysql_IDMAPS = \
+	../refman-5.4/metadata/installing-core.idmap \
 	../refman-common/metadata/bug-reports.idmap \
 	../refman-common/metadata/information-sources.idmap \
 	metadata/dba-log-files.idmap \

@@ -2823,7 +2801,7 @@
 	metadata/events.idmap \
 	metadata/extending-mysql.idmap \
 	metadata/functions-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/language-structure-core.idmap \
 	metadata/optimization.idmap \
 	metadata/programs-installation.idmap \

@@ -2902,19 +2880,528 @@
 information-schema-manprepped.xml: $(information_schema_SOURCES) $(information_schema_IDMAPS)
 information-schema-remprepped.xml: $(information_schema_SOURCES) $(information_schema_IDMAPS)
 
-installing_core_INCLUDES =
-installing_core_IMAGES =
-installing_core_SOURCES = installing-core.xml $(installing_core_INCLUDES)
-installing_core_IDMAPS =
-installing-core.validpure: $(installing_core_SOURCES)
-installing-core.titles: $(installing_core_SOURCES)
-installing-core.useless: $(installing_core_SOURCES)
-installing-core.valid: $(installing_core_SOURCES) $(installing_core_IDMAPS)
-installing-core.validwarn: $(installing_core_SOURCES) $(installing_core_IDMAPS)
-installing-core-prepped.xml: $(installing_core_SOURCES) $(installing_core_IDMAPS)
-installing-core-manprepped.xml: $(installing_core_SOURCES) $(installing_core_IDMAPS)
-installing-core-remprepped.xml: $(installing_core_SOURCES) $(installing_core_IDMAPS)
+installing_aix_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_aix_IMAGES =
+installing_aix_SOURCES = installing-aix.xml $(installing_aix_INCLUDES)
+installing_aix_IDMAPS =
+installing-aix.validpure: $(installing_aix_SOURCES)
+installing-aix.titles: $(installing_aix_SOURCES)
+installing-aix.useless: $(installing_aix_SOURCES)
+installing-aix.valid: $(installing_aix_SOURCES) $(installing_aix_IDMAPS)
+installing-aix.validwarn: $(installing_aix_SOURCES) $(installing_aix_IDMAPS)
+installing-aix-prepped.xml: $(installing_aix_SOURCES) $(installing_aix_IDMAPS)
+installing-aix-manprepped.xml: $(installing_aix_SOURCES) $(installing_aix_IDMAPS)
+installing-aix-remprepped.xml: $(installing_aix_SOURCES) $(installing_aix_IDMAPS)
 
+installing_bsd_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_bsd_IMAGES =
+installing_bsd_SOURCES = installing-bsd.xml $(installing_bsd_INCLUDES)
+installing_bsd_IDMAPS = \
+	metadata/errors-problems-core.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/programs-server-core.idmap
+installing-bsd.validpure: $(installing_bsd_SOURCES)
+installing-bsd.titles: $(installing_bsd_SOURCES)
+installing-bsd.useless: $(installing_bsd_SOURCES)
+installing-bsd.valid: $(installing_bsd_SOURCES) $(installing_bsd_IDMAPS)
+installing-bsd.validwarn: $(installing_bsd_SOURCES) $(installing_bsd_IDMAPS)
+installing-bsd-prepped.xml: $(installing_bsd_SOURCES) $(installing_bsd_IDMAPS)
+installing-bsd-manprepped.xml: $(installing_bsd_SOURCES) $(installing_bsd_IDMAPS)
+installing-bsd-remprepped.xml: $(installing_bsd_SOURCES) $(installing_bsd_IDMAPS)
+
+installing_envvar_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_envvar_IMAGES =
+installing_envvar_SOURCES = installing-envvar.xml $(installing_envvar_INCLUDES)
+installing_envvar_IDMAPS = \
+	metadata/dba-user-management-core.idmap \
+	metadata/errors-problems-core.idmap \
+	metadata/programs-using.idmap
+installing-envvar.validpure: $(installing_envvar_SOURCES)
+installing-envvar.titles: $(installing_envvar_SOURCES)
+installing-envvar.useless: $(installing_envvar_SOURCES)
+installing-envvar.valid: $(installing_envvar_SOURCES) $(installing_envvar_IDMAPS)
+installing-envvar.validwarn: $(installing_envvar_SOURCES) $(installing_envvar_IDMAPS)
+installing-envvar-prepped.xml: $(installing_envvar_SOURCES) $(installing_envvar_IDMAPS)
+installing-envvar-manprepped.xml: $(installing_envvar_SOURCES) $(installing_envvar_IDMAPS)
+installing-envvar-remprepped.xml: $(installing_envvar_SOURCES) $(installing_envvar_IDMAPS)
+
+installing_general_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_general_IMAGES =
+installing_general_SOURCES = installing-general.xml $(installing_general_INCLUDES)
+installing_general_IDMAPS = \
+	../refman-5.4/metadata/installing-core.idmap \
+	metadata/extending-mysql.idmap \
+	metadata/installing-aix.idmap \
+	metadata/installing-bsd.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-generic-binary.idmap \
+	metadata/installing-hpux.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-macosx.idmap \
+	metadata/installing-solaris.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-windows.idmap \
+	metadata/news.idmap \
+	metadata/optimization.idmap
+installing-general.validpure: $(installing_general_SOURCES)
+installing-general.titles: $(installing_general_SOURCES)
+installing-general.useless: $(installing_general_SOURCES)
+installing-general.valid: $(installing_general_SOURCES) $(installing_general_IDMAPS)
+installing-general.validwarn: $(installing_general_SOURCES) $(installing_general_IDMAPS)
+installing-general-prepped.xml: $(installing_general_SOURCES) $(installing_general_IDMAPS)
+installing-general-manprepped.xml: $(installing_general_SOURCES) $(installing_general_IDMAPS)
+installing-general-remprepped.xml: $(installing_general_SOURCES) $(installing_general_IDMAPS)
+
+installing_generic_binary_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_generic_binary_IMAGES =
+installing_generic_binary_SOURCES = installing-generic-binary.xml $(installing_generic_binary_INCLUDES)
+installing_generic_binary_IDMAPS = \
+	../refman-5.4/metadata/installing-core.idmap \
+	../refman-common/metadata/bug-reports.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-perl.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-windows.idmap \
+	metadata/programs-admin-util-core.idmap \
+	metadata/programs-server-core.idmap
+installing-generic-binary.validpure: $(installing_generic_binary_SOURCES)
+installing-generic-binary.titles: $(installing_generic_binary_SOURCES)
+installing-generic-binary.useless: $(installing_generic_binary_SOURCES)
+installing-generic-binary.valid: $(installing_generic_binary_SOURCES) $(installing_generic_binary_IDMAPS)
+installing-generic-binary.validwarn: $(installing_generic_binary_SOURCES) $(installing_generic_binary_IDMAPS)
+installing-generic-binary-prepped.xml: $(installing_generic_binary_SOURCES) $(installing_generic_binary_IDMAPS)
+installing-generic-binary-manprepped.xml: $(installing_generic_binary_SOURCES) $(installing_generic_binary_IDMAPS)
+installing-generic-binary-remprepped.xml: $(installing_generic_binary_SOURCES) $(installing_generic_binary_IDMAPS)
+
+installing_hpux_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_hpux_IMAGES =
+installing_hpux_SOURCES = installing-hpux.xml $(installing_hpux_INCLUDES)
+installing_hpux_IDMAPS =
+installing-hpux.validpure: $(installing_hpux_SOURCES)
+installing-hpux.titles: $(installing_hpux_SOURCES)
+installing-hpux.useless: $(installing_hpux_SOURCES)
+installing-hpux.valid: $(installing_hpux_SOURCES) $(installing_hpux_IDMAPS)
+installing-hpux.validwarn: $(installing_hpux_SOURCES) $(installing_hpux_IDMAPS)
+installing-hpux-prepped.xml: $(installing_hpux_SOURCES) $(installing_hpux_IDMAPS)
+installing-hpux-manprepped.xml: $(installing_hpux_SOURCES) $(installing_hpux_IDMAPS)
+installing-hpux-remprepped.xml: $(installing_hpux_SOURCES) $(installing_hpux_IDMAPS)
+
+installing_i5os_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_i5os_IMAGES =
+installing_i5os_SOURCES = installing-i5os.xml $(installing_i5os_INCLUDES)
+installing_i5os_IDMAPS = \
+	metadata/installing-generic-binary.idmap \
+	metadata/installing-i5os.idmap \
+	metadata/installing-postinstall.idmap
+installing-i5os.validpure: $(installing_i5os_SOURCES)
+installing-i5os.titles: $(installing_i5os_SOURCES)
+installing-i5os.useless: $(installing_i5os_SOURCES)
+installing-i5os.valid: $(installing_i5os_SOURCES) $(installing_i5os_IDMAPS)
+installing-i5os.validwarn: $(installing_i5os_SOURCES) $(installing_i5os_IDMAPS)
+installing-i5os-prepped.xml: $(installing_i5os_SOURCES) $(installing_i5os_IDMAPS)
+installing-i5os-manprepped.xml: $(installing_i5os_SOURCES) $(installing_i5os_IDMAPS)
+installing-i5os-remprepped.xml: $(installing_i5os_SOURCES) $(installing_i5os_IDMAPS)
+
+installing_linux_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_linux_IMAGES =
+installing_linux_SOURCES = installing-linux.xml $(installing_linux_INCLUDES)
+installing_linux_IDMAPS = \
+	metadata/installing-general.idmap \
+	metadata/installing-generic-binary.idmap \
+	metadata/installing-perl.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/mysql-cluster-multi-computer.idmap \
+	metadata/mysql-cluster-programs-core.idmap
+installing-linux.validpure: $(installing_linux_SOURCES)
+installing-linux.titles: $(installing_linux_SOURCES)
+installing-linux.useless: $(installing_linux_SOURCES)
+installing-linux.valid: $(installing_linux_SOURCES) $(installing_linux_IDMAPS)
+installing-linux.validwarn: $(installing_linux_SOURCES) $(installing_linux_IDMAPS)
+installing-linux-prepped.xml: $(installing_linux_SOURCES) $(installing_linux_IDMAPS)
+installing-linux-manprepped.xml: $(installing_linux_SOURCES) $(installing_linux_IDMAPS)
+installing-linux-remprepped.xml: $(installing_linux_SOURCES) $(installing_linux_IDMAPS)
+
+installing_macosx_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_macosx_IMAGES =
+installing_macosx_SOURCES = installing-macosx.xml $(installing_macosx_INCLUDES)
+installing_macosx_IDMAPS = \
+	metadata/installing-general.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/programs-using.idmap
+installing-macosx.validpure: $(installing_macosx_SOURCES)
+installing-macosx.titles: $(installing_macosx_SOURCES)
+installing-macosx.useless: $(installing_macosx_SOURCES)
+installing-macosx.valid: $(installing_macosx_SOURCES) $(installing_macosx_IDMAPS)
+installing-macosx.validwarn: $(installing_macosx_SOURCES) $(installing_macosx_IDMAPS)
+installing-macosx-prepped.xml: $(installing_macosx_SOURCES) $(installing_macosx_IDMAPS)
+installing-macosx-manprepped.xml: $(installing_macosx_SOURCES) $(installing_macosx_IDMAPS)
+installing-macosx-remprepped.xml: $(installing_macosx_SOURCES) $(installing_macosx_IDMAPS)
+
+installing_perl_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_perl_IMAGES =
+installing_perl_SOURCES = installing-perl.xml $(installing_perl_INCLUDES)
+installing_perl_IDMAPS = \
+	metadata/mysql-cluster-programs-core.idmap \
+	metadata/optimization.idmap
+installing-perl.validpure: $(installing_perl_SOURCES)
+installing-perl.titles: $(installing_perl_SOURCES)
+installing-perl.useless: $(installing_perl_SOURCES)
+installing-perl.valid: $(installing_perl_SOURCES) $(installing_perl_IDMAPS)
+installing-perl.validwarn: $(installing_perl_SOURCES) $(installing_perl_IDMAPS)
+installing-perl-prepped.xml: $(installing_perl_SOURCES) $(installing_perl_IDMAPS)
+installing-perl-manprepped.xml: $(installing_perl_SOURCES) $(installing_perl_IDMAPS)
+installing-perl-remprepped.xml: $(installing_perl_SOURCES) $(installing_perl_IDMAPS)
+
+installing_postinstall_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_postinstall_IMAGES =
+installing_postinstall_SOURCES = installing-postinstall.xml $(installing_postinstall_INCLUDES)
+installing_postinstall_IDMAPS = \
+	../refman-5.4/metadata/installing-core.idmap \
+	../refman-common/metadata/bug-reports.idmap \
+	metadata/dba-multiple-servers.idmap \
+	metadata/dba-privilege-system.idmap \
+	metadata/dba-security-core.idmap \
+	metadata/dba-user-management-core.idmap \
+	metadata/errors-problems-core.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-perl.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-windows.idmap \
+	metadata/internationalization.idmap \
+	metadata/mysql-cluster-configuration-core.idmap \
+	metadata/programs-client-core.idmap \
+	metadata/programs-server-core.idmap \
+	metadata/programs-using.idmap \
+	metadata/se-innodb-core.idmap
+installing-postinstall.validpure: $(installing_postinstall_SOURCES)
+installing-postinstall.titles: $(installing_postinstall_SOURCES)
+installing-postinstall.useless: $(installing_postinstall_SOURCES)
+installing-postinstall.valid: $(installing_postinstall_SOURCES) $(installing_postinstall_IDMAPS)
+installing-postinstall.validwarn: $(installing_postinstall_SOURCES) $(installing_postinstall_IDMAPS)
+installing-postinstall-prepped.xml: $(installing_postinstall_SOURCES) $(installing_postinstall_IDMAPS)
+installing-postinstall-manprepped.xml: $(installing_postinstall_SOURCES) $(installing_postinstall_IDMAPS)
+installing-postinstall-remprepped.xml: $(installing_postinstall_SOURCES) $(installing_postinstall_IDMAPS)
+
+installing_solaris_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_solaris_IMAGES =
+installing_solaris_SOURCES = installing-solaris.xml $(installing_solaris_INCLUDES)
+installing_solaris_IDMAPS = \
+	metadata/installing-solaris.idmap
+installing-solaris.validpure: $(installing_solaris_SOURCES)
+installing-solaris.titles: $(installing_solaris_SOURCES)
+installing-solaris.useless: $(installing_solaris_SOURCES)
+installing-solaris.valid: $(installing_solaris_SOURCES) $(installing_solaris_IDMAPS)
+installing-solaris.validwarn: $(installing_solaris_SOURCES) $(installing_solaris_IDMAPS)
+installing-solaris-prepped.xml: $(installing_solaris_SOURCES) $(installing_solaris_IDMAPS)
+installing-solaris-manprepped.xml: $(installing_solaris_SOURCES) $(installing_solaris_IDMAPS)
+installing-solaris-remprepped.xml: $(installing_solaris_SOURCES) $(installing_solaris_IDMAPS)
+
+installing_updowngrade_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	versions.ent
+installing_updowngrade_IMAGES =
+installing_updowngrade_SOURCES = installing-updowngrade.xml $(installing_updowngrade_INCLUDES)
+installing_updowngrade_IDMAPS = \
+	metadata/backup.idmap \
+	metadata/data-types.idmap \
+	metadata/dba-mysqld-server-core.idmap \
+	metadata/extending-mysql.idmap \
+	metadata/installing-updowngrade.idmap \
+	metadata/installing-windows.idmap \
+	metadata/internationalization.idmap \
+	metadata/language-structure-core.idmap \
+	metadata/news-5.1-core.idmap \
+	metadata/news.idmap \
+	metadata/programs-client-core.idmap \
+	metadata/programs-installation.idmap \
+	metadata/programs-server-core.idmap \
+	metadata/programs-using.idmap \
+	metadata/replication-notes.idmap \
+	metadata/restrictions.idmap \
+	metadata/se-myisam-core.idmap \
+	metadata/sql-syntax-compound-statements.idmap \
+	metadata/sql-syntax-replication.idmap \
+	metadata/sql-syntax-server-administration.idmap
+installing-updowngrade.validpure: $(installing_updowngrade_SOURCES)
+installing-updowngrade.titles: $(installing_updowngrade_SOURCES)
+installing-updowngrade.useless: $(installing_updowngrade_SOURCES)
+installing-updowngrade.valid: $(installing_updowngrade_SOURCES) $(installing_updowngrade_IDMAPS)
+installing-updowngrade.validwarn: $(installing_updowngrade_SOURCES) $(installing_updowngrade_IDMAPS)
+installing-updowngrade-prepped.xml: $(installing_updowngrade_SOURCES) $(installing_updowngrade_IDMAPS)
+installing-updowngrade-manprepped.xml: $(installing_updowngrade_SOURCES) $(installing_updowngrade_IDMAPS)
+installing-updowngrade-remprepped.xml: $(installing_updowngrade_SOURCES) $(installing_updowngrade_IDMAPS)
+
+installing_windows_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	images/published/mysql-cfg-fig1.png \
+	images/published/mysql-cfg-fig10.png \
+	images/published/mysql-cfg-fig2.png \
+	images/published/mysql-cfg-fig3.png \
+	images/published/mysql-cfg-fig4.png \
+	images/published/mysql-cfg-fig5.png \
+	images/published/mysql-cfg-fig6.png \
+	images/published/mysql-cfg-fig7.png \
+	images/published/mysql-cfg-fig8.png \
+	images/published/mysql-cfg-fig9.png \
+	versions.ent
+installing_windows_IMAGES = \
+	images/published/mysql-cfg-fig1.png \
+	images/published/mysql-cfg-fig10.png \
+	images/published/mysql-cfg-fig2.png \
+	images/published/mysql-cfg-fig3.png \
+	images/published/mysql-cfg-fig4.png \
+	images/published/mysql-cfg-fig5.png \
+	images/published/mysql-cfg-fig6.png \
+	images/published/mysql-cfg-fig7.png \
+	images/published/mysql-cfg-fig8.png \
+	images/published/mysql-cfg-fig9.png
+installing_windows_SOURCES = installing-windows.xml $(installing_windows_INCLUDES)
+installing_windows_IDMAPS = \
+	../refman-common/metadata/bug-reports.idmap \
+	../refman-common/metadata/connector-net-core.idmap \
+	../refman-common/metadata/connector-odbc.idmap \
+	metadata/backup.idmap \
+	metadata/dba-log-files.idmap \
+	metadata/dba-mysqld-server-core.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-updowngrade.idmap \
+	metadata/installing-windows.idmap \
+	metadata/language-structure-core.idmap \
+	metadata/programs-client-core.idmap \
+	metadata/programs-using.idmap \
+	metadata/restrictions.idmap \
+	metadata/sql-syntax-data-definition.idmap
+installing-windows.validpure: $(installing_windows_SOURCES)
+installing-windows.titles: $(installing_windows_SOURCES)
+installing-windows.useless: $(installing_windows_SOURCES)
+installing-windows.valid: $(installing_windows_SOURCES) $(installing_windows_IDMAPS)
+installing-windows.validwarn: $(installing_windows_SOURCES) $(installing_windows_IDMAPS)
+installing-windows-prepped.xml: $(installing_windows_SOURCES) $(installing_windows_IDMAPS)
+installing-windows-manprepped.xml: $(installing_windows_SOURCES) $(installing_windows_IDMAPS)
+installing-windows-remprepped.xml: $(installing_windows_SOURCES) $(installing_windows_IDMAPS)
+
+installing_INCLUDES = \
+	../common/fixedchars.ent \
+	../common/phrases.ent \
+	../gui-common/gui-common.ent \
+	../mysql-monitor-2.0/version.ent \
+	../mysql-monitor-common/enterprise.ent \
+	../refman-common/urls.ent \
+	all-entities.ent \
+	dynxml-local-installing-source.xml \
+	images/published/mysql-cfg-fig1.png \
+	images/published/mysql-cfg-fig10.png \
+	images/published/mysql-cfg-fig2.png \
+	images/published/mysql-cfg-fig3.png \
+	images/published/mysql-cfg-fig4.png \
+	images/published/mysql-cfg-fig5.png \
+	images/published/mysql-cfg-fig6.png \
+	images/published/mysql-cfg-fig7.png \
+	images/published/mysql-cfg-fig8.png \
+	images/published/mysql-cfg-fig9.png \
+	installing-aix.xml \
+	installing-bsd.xml \
+	installing-envvar.xml \
+	installing-general.xml \
+	installing-generic-binary.xml \
+	installing-hpux.xml \
+	installing-i5os.xml \
+	installing-linux.xml \
+	installing-macosx.xml \
+	installing-perl.xml \
+	installing-postinstall.xml \
+	installing-solaris.xml \
+	installing-updowngrade.xml \
+	installing-windows.xml \
+	versions.ent
+installing_IMAGES = \
+	images/published/mysql-cfg-fig1.png \
+	images/published/mysql-cfg-fig10.png \
+	images/published/mysql-cfg-fig2.png \
+	images/published/mysql-cfg-fig3.png \
+	images/published/mysql-cfg-fig4.png \
+	images/published/mysql-cfg-fig5.png \
+	images/published/mysql-cfg-fig6.png \
+	images/published/mysql-cfg-fig7.png \
+	images/published/mysql-cfg-fig8.png \
+	images/published/mysql-cfg-fig9.png
+installing_SOURCES = installing.xml $(installing_INCLUDES)
+installing_IDMAPS = \
+	../refman-5.4/metadata/installing-core.idmap \
+	../refman-common/metadata/bug-reports.idmap \
+	../refman-common/metadata/connector-net-core.idmap \
+	../refman-common/metadata/connector-odbc.idmap \
+	../refman-common/metadata/information-sources.idmap \
+	metadata/apis-c.idmap \
+	metadata/backup.idmap \
+	metadata/data-types.idmap \
+	metadata/dba-log-files.idmap \
+	metadata/dba-multiple-servers.idmap \
+	metadata/dba-mysqld-server-core.idmap \
+	metadata/dba-privilege-system.idmap \
+	metadata/dba-security-core.idmap \
+	metadata/dba-user-management-core.idmap \
+	metadata/errors-problems-core.idmap \
+	metadata/extending-mysql.idmap \
+	metadata/faqs-core.idmap \
+	metadata/installing-aix.idmap \
+	metadata/installing-bsd.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-generic-binary.idmap \
+	metadata/installing-hpux.idmap \
+	metadata/installing-i5os.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-macosx.idmap \
+	metadata/installing-perl.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-solaris.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-updowngrade.idmap \
+	metadata/installing-windows.idmap \
+	metadata/internationalization.idmap \
+	metadata/language-structure-core.idmap \
+	metadata/mysql-cluster-configuration-core.idmap \
+	metadata/mysql-cluster-multi-computer.idmap \
+	metadata/mysql-cluster-programs-core.idmap \
+	metadata/news-5.1-core.idmap \
+	metadata/news.idmap \
+	metadata/optimization.idmap \
+	metadata/programs-admin-util-core.idmap \
+	metadata/programs-client-core.idmap \
+	metadata/programs-installation.idmap \
+	metadata/programs-server-core.idmap \
+	metadata/programs-using.idmap \
+	metadata/replication-notes.idmap \
+	metadata/restrictions.idmap \
+	metadata/se-innodb-core.idmap \
+	metadata/se-myisam-core.idmap \
+	metadata/sql-syntax-compound-statements.idmap \
+	metadata/sql-syntax-data-definition.idmap \
+	metadata/sql-syntax-replication.idmap \
+	metadata/sql-syntax-server-administration.idmap
+installing.validpure: $(installing_SOURCES)
+installing.titles: $(installing_SOURCES)
+installing.useless: $(installing_SOURCES)
+installing.valid: $(installing_SOURCES) $(installing_IDMAPS)
+installing.validwarn: $(installing_SOURCES) $(installing_IDMAPS)
+installing-prepped.xml: $(installing_SOURCES) $(installing_IDMAPS)
+installing-manprepped.xml: $(installing_SOURCES) $(installing_IDMAPS)
+installing-remprepped.xml: $(installing_SOURCES) $(installing_IDMAPS)
+
 internationalization_INCLUDES = \
 	../common/fixedchars.ent \
 	../common/phrases.ent \

@@ -2932,7 +3419,7 @@
 	metadata/faqs-core.idmap \
 	metadata/functions-core.idmap \
 	metadata/information-schema.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/internationalization.idmap \
 	metadata/programs-installation.idmap \
 	metadata/replication-notes.idmap \

@@ -2970,6 +3457,7 @@
 	../refman-4.1/metadata/introduction.idmap \
 	../refman-5.0/metadata/introduction.idmap \
 	../refman-5.4/metadata/information-schema.idmap \
+	../refman-5.4/metadata/installing-core.idmap \
 	../refman-5.4/metadata/introduction.idmap \
 	../refman-5.4/metadata/replication-solutions.idmap \
 	../refman-5.4/metadata/sql-syntax-compound-statements.idmap \

@@ -2995,6 +3483,8 @@
 	metadata/functions-core.idmap \
 	metadata/information-schema.idmap \
 	metadata/installing-core.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/internationalization.idmap \
 	metadata/introduction.idmap \
 	metadata/language-structure-core.idmap \

@@ -3240,7 +3730,6 @@
 manual-index-sysvar-core-remprepped.xml: $(manual_index_sysvar_core_SOURCES) $(manual_index_sysvar_core_IDMAPS)
 
 manual_INCLUDES = \
-	../../mysqldoc/dynamic-docs/build-configure/mysqld.xml \
 	../../mysqldoc/dynamic-docs/changelog/connector-cpp-versions.xml \
 	../../mysqldoc/dynamic-docs/changelog/connector-cpp.xml \
 	../../mysqldoc/dynamic-docs/changelog/connector-j-versions.xml \

@@ -3771,7 +4260,7 @@
 	dynxml-local-errors-problems.xml \
 	dynxml-local-faqs.xml \
 	dynxml-local-functions.xml \
-	dynxml-local-installing.xml \
+	dynxml-local-installing-source.xml \
 	dynxml-local-language-structure.xml \
 	dynxml-local-manual-index-cfunc.xml \
 	dynxml-local-manual-index-command.xml \

@@ -3820,7 +4309,21 @@
 	images/published/mysql-cfg-fig8.png \
 	images/published/mysql-cfg-fig9.png \
 	information-schema.xml \
-	installing-core.xml \
+	installing-aix.xml \
+	installing-bsd.xml \
+	installing-envvar.xml \
+	installing-general.xml \
+	installing-generic-binary.xml \
+	installing-hpux.xml \
+	installing-i5os.xml \
+	installing-linux.xml \
+	installing-macosx.xml \
+	installing-perl.xml \
+	installing-postinstall.xml \
+	installing-solaris.xml \
+	installing-updowngrade.xml \
+	installing-windows.xml \
+	installing.xml \
 	internationalization.xml \
 	introduction.xml \
 	language-structure-core.xml \

@@ -4207,6 +4710,7 @@
 	../refman-5.0/metadata/news-5.0-core.idmap \
 	../refman-5.0/metadata/windows-config-wizard.idmap \
 	../refman-5.4/metadata/information-schema.idmap \
+	../refman-5.4/metadata/installing-core.idmap \
 	../refman-5.4/metadata/introduction.idmap \
 	../refman-5.4/metadata/replication-solutions.idmap \
 	../refman-5.4/metadata/sql-syntax-compound-statements.idmap \

@@ -4274,7 +4778,22 @@
 	metadata/faqs-core.idmap \
 	metadata/functions-core.idmap \
 	metadata/information-schema.idmap \
+	metadata/installing-aix.idmap \
+	metadata/installing-bsd.idmap \
 	metadata/installing-core.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-generic-binary.idmap \
+	metadata/installing-hpux.idmap \
+	metadata/installing-i5os.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-macosx.idmap \
+	metadata/installing-perl.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-solaris.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-updowngrade.idmap \
+	metadata/installing-windows.idmap \
 	metadata/internationalization.idmap \
 	metadata/introduction.idmap \
 	metadata/language-structure-core.idmap \

@@ -4831,10 +5350,14 @@
 	../refman-common/images/published/rolling-restarts.png
 mysql_cluster_multi_computer_SOURCES = mysql-cluster-multi-computer.xml $(mysql_cluster_multi_computer_INCLUDES)
 mysql_cluster_multi_computer_IDMAPS = \
-	metadata/installing-core.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/mysql-cluster-configuration-core.idmap \
 	metadata/mysql-cluster-management.idmap \
 	metadata/mysql-cluster-multi-computer.idmap \
+	metadata/mysql-cluster-news-core.idmap \
 	metadata/mysql-cluster-overview.idmap \
 	metadata/mysql-cluster-programs-core.idmap \
 	metadata/mysql-cluster-replication.idmap \

@@ -4886,7 +5409,7 @@
 	../ndbapi/metadata/ndb-internals.idmap \
 	../refman-common/metadata/bug-reports.idmap \
 	metadata/data-types.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/mysql-cluster-configuration-core.idmap \
 	metadata/mysql-cluster-management.idmap \
 	metadata/mysql-cluster-multi-computer.idmap \

@@ -5068,7 +5591,10 @@
 	metadata/dba-security-core.idmap \
 	metadata/faqs-core.idmap \
 	metadata/information-schema.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/introduction.idmap \
 	metadata/mysql-cluster-configuration-core.idmap \
 	metadata/mysql-cluster-glossary.idmap \

@@ -5268,7 +5794,8 @@
 	metadata/extending-mysql.idmap \
 	metadata/functions-core.idmap \
 	metadata/information-schema.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-perl.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/introduction.idmap \
 	metadata/language-structure-core.idmap \
 	metadata/optimization.idmap \

@@ -5312,7 +5839,7 @@
 	metadata/errors-problems-core.idmap \
 	metadata/functions-core.idmap \
 	metadata/information-schema.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/mysql-cluster-overview.idmap \
 	metadata/mysql-cluster.idmap \
 	metadata/news-5.1-core.idmap \

@@ -5447,7 +5974,9 @@
 programs_installation_SOURCES = programs-installation.xml $(programs_installation_INCLUDES)
 programs_installation_IDMAPS = \
 	metadata/backup.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/internationalization.idmap \
 	metadata/language-structure-core.idmap \
 	metadata/programs-installation.idmap \

@@ -5513,7 +6042,7 @@
 	metadata/dba-multiple-servers.idmap \
 	metadata/dba-mysqld-server-core.idmap \
 	metadata/dba-user-management-core.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-envvar.idmap \
 	metadata/language-structure-core.idmap \
 	metadata/mysql-cluster-configuration-core.idmap \
 	metadata/mysql-cluster-multi-computer.idmap \

@@ -5575,6 +6104,13 @@
 	metadata/dba-user-management-core.idmap \
 	metadata/events.idmap \
 	metadata/installing-core.idmap \
+	metadata/installing-envvar.idmap \
+	metadata/installing-general.idmap \
+	metadata/installing-linux.idmap \
+	metadata/installing-perl.idmap \
+	metadata/installing-postinstall.idmap \
+	metadata/installing-source-core.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/internationalization.idmap \
 	metadata/language-structure-core.idmap \
 	metadata/mysql-cluster-configuration-core.idmap \

@@ -6036,7 +6572,7 @@
 se_merge_IMAGES =
 se_merge_SOURCES = se-merge.xml $(se_merge_INCLUDES)
 se_merge_IDMAPS = \
-	metadata/installing-core.idmap \
+	metadata/installing-source-core.idmap \
 	metadata/programs-admin-util-core.idmap \
 	metadata/sql-syntax-utility.idmap
 se-merge.validpure: $(se_merge_SOURCES)

@@ -6136,7 +6672,7 @@
 	metadata/extending-mysql.idmap \
 	metadata/functions-core.idmap \
 	metadata/information-schema.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/internationalization.idmap \
 	metadata/introduction.idmap \
 	metadata/language-structure-core.idmap \

@@ -6303,7 +6839,7 @@
 	metadata/events.idmap \
 	metadata/extending-mysql.idmap \
 	metadata/information-schema.idmap \
-	metadata/installing-core.idmap \
+	metadata/installing-updowngrade.idmap \
 	metadata/internationalization.idmap \
 	metadata/language-structure-core.idmap \
 	metadata/mysql-cluster-overview.idmap \


Added: trunk/refman-5.1/installing-aix.xml
===================================================================
--- trunk/refman-5.1/installing-aix.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-aix.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 256, Lines Deleted: 0; 9316 bytes

@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="ibm-aix">
+
+        <title>Installing MySQL on AIX</title>
+
+        <indexterm>
+          <primary>problems</primary>
+          <secondary>installing on IBM-AIX</secondary>
+        </indexterm>
+
+        <para>
+          Automatic detection of <literal>xlC</literal> is missing from
+          Autoconf, so a number of variables need to be set before
+          running <command>configure</command>. The following example
+          uses the IBM compiler:
+        </para>
+
+<programlisting>
+export CC="xlc_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192 "
+export CXX="xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192"
+export CFLAGS="-I /usr/local/include"
+export LDFLAGS="-L /usr/local/lib"
+export CPPFLAGS=$CFLAGS
+export CXXFLAGS=$CFLAGS
+
+./configure --prefix=/usr/local \
+                --localstatedir=/var/mysql \
+                --sbindir='/usr/local/bin' \
+                --libexecdir='/usr/local/bin' \
+                --enable-thread-safe-client \
+                --enable-large-files
+</programlisting>
+
+        <para>
+          The preceding options are used to compile the MySQL
+          distribution that can be found at
+          <ulink url="http://www-frec.bull.com/"/>.
+        </para>
+
+        <para>
+          If you change the <option>-O3</option> to <option>-O2</option>
+          in the preceding <command>configure</command> line, you must
+          also remove the <option>-qstrict</option> option. This is a
+          limitation in the IBM C compiler.
+        </para>
+
+        <para>
+          If you are using <command>gcc</command> to compile MySQL, you
+          <emphasis>must</emphasis> use the
+          <option>-fno-exceptions</option> flag, because the exception
+          handling in <command>gcc</command> is not thread-safe! There
+          are also some known problems with IBM's assembler that may
+          cause it to generate bad code when used with
+          <command>gcc</command>.
+        </para>
+
+        <para>
+          Use the following <command>configure</command> line with
+          <command>gcc</command> 2.95 on AIX:
+        </para>
+
+<programlisting>
+CC="gcc -pipe -mcpu=power -Wa,-many" \
+CXX="gcc -pipe -mcpu=power -Wa,-many" \
+CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \
+./configure --prefix=/usr/local/mysql --with-low-memory
+</programlisting>
+
+        <para>
+          The <option>-Wa,-many</option> option is necessary for the
+          compile to be successful. IBM is aware of this problem but is
+          in no hurry to fix it because of the workaround that is
+          available. We don't know if the
+          <option>-fno-exceptions</option> is required with
+          <command>gcc</command> 2.95, but because MySQL doesn't use
+          exceptions and the option generates faster code, you should
+          always use it with <command>gcc</command>.
+        </para>
+
+        <para>
+          If you get a problem with assembler code, try changing the
+          <option>-mcpu=<replaceable>xxx</replaceable></option> option
+          to match your CPU. Typically <literal>power2</literal>,
+          <literal>power</literal>, or <literal>powerpc</literal> may
+          need to be used. Alternatively, you might need to use
+          <literal>604</literal> or <literal>604e</literal>. We are not
+          positive but suspect that <literal>power</literal> would
+          likely be safe most of the time, even on a power2 machine.
+        </para>
+
+        <para>
+          If you don't know what your CPU is, execute a <literal>uname
+          -m</literal> command. It produces a string that looks like
+          <literal>000514676700</literal>, with a format of
+          <literal>xxyyyyyymmss</literal> where <literal>xx</literal>
+          and <literal>ss</literal> are always <literal>00</literal>,
+          <literal>yyyyyy</literal> is a unique system ID and
+          <literal>mm</literal> is the ID of the CPU Planar. A chart of
+          these values can be found at
+          <ulink url="http://www16.boulder.ibm.com/pseries/en_US/cmds/aixcmds5/uname.htm"/>.
+        </para>
+
+        <remark>
+          older URL...
+          http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds5/uname.htm
+        </remark>
+
+        <para>
+          This gives you a machine type and a machine model you can use
+          to determine what type of CPU you have.
+        </para>
+
+        <para>
+          If you have problems with threads on AIX 5.3, you should
+          upgrade AIX 5.3 to technology level 7 (5300-07).
+        </para>
+
+        <para>
+          If you have problems with signals (MySQL dies unexpectedly
+          under high load), you may have found an OS bug with threads
+          and signals. In this case, you can tell MySQL not to use
+          signals by configuring as follows:
+        </para>
+
+<programlisting>
+CFLAGS=-DDONT_USE_THR_ALARM CXX=gcc \
+CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti \
+-DDONT_USE_THR_ALARM" \
+./configure --prefix=/usr/local/mysql --with-debug \
+    --with-low-memory
+</programlisting>
+
+        <para>
+          This doesn't affect the performance of MySQL, but has the side
+          effect that you can't kill clients that are
+          <quote>sleeping</quote> on a connection with
+          <command>mysqladmin kill</command> or <command>mysqladmin
+          shutdown</command>. Instead, the client dies when it issues
+          its next command.
+        </para>
+
+        <para>
+          On some versions of AIX, linking with
+          <literal>libbind.a</literal> makes
+          <literal>getservbyname()</literal> dump core. This is an AIX
+          bug and should be reported to IBM.
+        </para>
+
+        <para>
+          For AIX 4.2.1 and <command>gcc</command>, you have to make the
+          following changes.
+        </para>
+
+        <para>
+          After configuring, edit <filename>config.h</filename> and
+          <filename>include/my_config.h</filename> and change the line
+          that says this:
+        </para>
+
+<programlisting>
+#define HAVE_SNPRINTF 1
+</programlisting>
+
+        <para>
+          to this:
+        </para>
+
+<programlisting>
+#undef HAVE_SNPRINTF
+</programlisting>
+
+        <para>
+          And finally, in <filename>mysqld.cc</filename>, you need to
+          add a prototype for <literal>initgroups()</literal>.
+        </para>
+
+<programlisting>
+#ifdef _AIX41
+extern "C" int initgroups(const char *,int);
+#endif
+</programlisting>
+
+        <para>
+          For 32-bit binaries, if you need to allocate a lot of memory
+          to the <command>mysqld</command> process, it is not enough to
+          just use <command>ulimit -d unlimited</command>. You may also
+          have to modify <command>mysqld_safe</command> to add a line
+          something like this:
+        </para>
+
+<programlisting>
+export LDR_CNTRL='MAXDATA=0x80000000'
+</programlisting>
+
+        <para>
+          You can find more information about using a lot of memory at
+          <ulink url="http://publib16.boulder.ibm.com/pseries/en_US/aixprggd/genprogc/lrg_prg_support.htm"/>.
+        </para>
+
+        <para>
+          Users of AIX 4.3 should use <command>gmake</command> instead
+          of the <command>make</command> utility included with AIX.
+        </para>
+
+        <para>
+          As of AIX 4.1, the C compiler has been unbundled from AIX as a
+          separate product. <command>gcc</command> 3.3.2 can be obtained
+          here:
+          <ulink url="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc/"/>
+        </para>
+
+        <para>
+          The steps for compiling MySQL on AIX with
+          <command>gcc</command> 3.3.2 are similar to those for using
+          <command>gcc</command> 2.95 (in particular, the need to edit
+          <filename>config.h</filename> and
+          <filename>my_config.h</filename> after running
+          <command>configure</command>). However, before running
+          <command>configure</command>, you should also patch the
+          <filename>curses.h</filename> file as follows:
+        </para>
+
+<programlisting>
+/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h.ORIG
+       Mon Dec 26 02:17:28 2005
+--- /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h
+Mon Dec 26 02:40:13 2005
+***************
+*** 2023,2029 ****
+
+
+  #endif /* _AIX32_CURSES */
+! #if defined(__USE_FIXED_PROTOTYPES__) || defined(__cplusplus) || defined
+(__STRICT_ANSI__)
+  extern int delwin (WINDOW *);
+  extern int endwin (void);
+  extern int getcurx (WINDOW *);
+--- 2023,2029 ----
+
+
+  #endif /* _AIX32_CURSES */
+! #if 0 &amp;&amp; (defined(__USE_FIXED_PROTOTYPES__) || defined(__cplusplus)
+|| defined
+(__STRICT_ANSI__))
+  extern int delwin (WINDOW *);
+  extern int endwin (void);
+  extern int getcurx (WINDOW *);
+</programlisting>
+
+      </section>


Added: trunk/refman-5.1/installing-bsd.xml
===================================================================
--- trunk/refman-5.1/installing-bsd.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-bsd.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 134, Lines Deleted: 0; 4670 bytes

@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="mysql-installation-freebsd">
+
+      <title>Installing MySQL on FreeBSD</title>
+
+      <para>
+        This section provides information about using MySQL on variants
+        of FreeBSD Unix.
+      </para>
+  
+        <para>
+          The easiest (and preferred) way to install MySQL is to use the
+          <command>mysql-server</command> and
+          <literal>mysql-client</literal> ports available at
+          <ulink url="http://www.freebsd.org/"/>. Using these ports
+          gives you the following benefits:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              A working MySQL with all optimizations enabled that are
+              known to work on your version of FreeBSD.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Automatic configuration and build.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Startup scripts installed in
+              <filename>/usr/local/etc/rc.d</filename>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The ability to use <literal>pkg_info -L</literal> to see
+              which files are installed.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The ability to use <literal>pkg_delete</literal> to remove
+              MySQL if you no longer want it on your machine.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+  
+        <para>
+          The MySQL build process requires GNU make
+          (<command>gmake</command>) to work. If GNU
+          <command>make</command> is not available, you must install it
+          first before compiling MySQL.
+        </para>
+
+        <para>
+          The recommended way to compile and install MySQL on FreeBSD
+          with <command>gcc</command> (2.95.2 and up) is:
+        </para>
+
+<programlisting>
+CC=gcc CFLAGS="-O2 -fno-strength-reduce" \
+    CXX=gcc CXXFLAGS="-O2 -fno-rtti -fno-exceptions \
+    -felide-constructors -fno-strength-reduce" \
+    ./configure --prefix=/usr/local/mysql --enable-assembler
+gmake
+gmake install
+cd /usr/local/mysql
+bin/mysql_install_db --user=mysql
+bin/mysqld_safe &amp;
+</programlisting>
+
+
+ 
+        <para>
+          FreeBSD is known to have a very low default file handle limit.
+          See <xref linkend="not-enough-file-handles"/>. Start the
+          server by using the
+          <option role="mysqld_safe">--open-files-limit</option> option
+          for <command>mysqld_safe</command>, or raise the limits for
+          the <command>mysqld</command> user in
+          <filename>/etc/login.conf</filename> and rebuild it with
+          <literal>cap_mkdb /etc/login.conf</literal>. Also be sure that
+          you set the appropriate class for this user in the password
+          file if you are not using the default (use <literal>chpass
+          mysqld-user-name</literal>). See
+          <xref linkend="mysqld-safe"/>.
+        </para>
+
+
+        <para>
+          In current versions of FreeBSD (at least 4.x and greater), you
+          may increase the limit on the amount of memory available for a process by adding the following entries to the
+          <filename>/boot/loader.conf</filename> file and rebooting the
+          machine (these are not settings that can be changed at run
+          time with the <command>sysctl</command> command):
+        </para>
+
+<programlisting>
+kern.maxdsiz="1073741824" # 1GB
+kern.dfldsiz="1073741824" # 1GB
+kern.maxssiz="134217728" # 128MB
+</programlisting>
+
+        <para>
+          For older versions of FreeBSD, you must recompile your kernel
+          to change the maximum data segment size for a process. In this
+          case, you should look at the <literal>MAXDSIZ</literal> option
+          in the <literal>LINT</literal> config file for more
+          information.
+        </para>
+
+        <para>
+          If you get problems with the current date in MySQL, setting
+          the <literal>TZ</literal> variable should help. See
+          <xref linkend="environment-variables"/>.
+        </para>
+
+      </section>


Added: trunk/refman-5.1/installing-core.xml
===================================================================
--- trunk/refman-5.1/installing-core.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-core.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 176, Lines Deleted: 0; 6101 bytes

@@ -0,0 +1,176 @@
+<?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 id="installing">
+
+  <title>Installing and Upgrading MySQL</title>
+
+  <remark role="dynamic-dependency-list"/>
+
+  <indexterm>
+    <primary>installing</primary>
+    <secondary>overview</secondary>
+  </indexterm>
+
+  <para>
+    This chapter describes how to obtain and install MySQL. A summary of
+    the procedure follows and later sections provide the details. If you
+    plan to upgrade an existing version of MySQL to a newer version
+    rather than install MySQL for the first time, see
+    <xref linkend="upgrade"/>, for information about upgrade procedures
+    and about issues that you should consider before upgrading.
+  </para>
+
+  <para>
+    If you are interested in migrating to MySQL from another database
+    system, you may wish to read <xref linkend="faqs-migration"/>, which
+    contains answers to some common questions concerning migration
+    issues.
+  </para>
+
+  <orderedlist>
+
+    <listitem>
+      <para>
+        <emphasis role="bold">Determine whether MySQL runs and is
+        supported on your platform.</emphasis> Please note that not all
+        platforms are equally suitable for running MySQL, and that not
+        all platforms on which MySQL is known to run are officially
+        supported by Sun Microsystems, Inc.:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            For MySQL Enterprise Server, the officially supported
+            platforms are listed at
+            <ulink url="http://www.mysql.com/support/supportedplatforms.html"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            MySQL Community Server runs on the platforms listed at
+            <xref linkend="which-os"/>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>
+        <emphasis role="bold">Choose which distribution to
+        install.</emphasis> Several versions of MySQL are available, and
+        most are available in several distribution formats. You can
+        choose from pre-packaged distributions containing binary
+        (precompiled) programs or source code. When in doubt, use a
+        binary distribution. We also provide public access to our
+        current source tree for those who want to see our most recent
+        developments and help us test new code. To determine which
+        version and type of distribution you should use, see
+        <xref linkend="which-version"/>.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        <emphasis role="bold">Download the distribution that you want to
+        install.</emphasis> For instructions, see
+        <xref linkend="getting-mysql"/>. To verify the integrity of the
+        distribution, use the instructions in
+        <xref linkend="verifying-package-integrity"/>.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        <emphasis role="bold">Install the distribution.</emphasis> To
+        install MySQL from a binary distribution, use the instructions
+        in <xref linkend="quick-standard-installation"/>. To install
+        MySQL from a source distribution or from the current development
+        source tree, use the instructions in
+        <xref linkend="installing-source"/>.
+      </para>
+
+      <para>
+        If you encounter installation difficulties, see
+        <xref linkend="operating-system-specific-notes"/>, for
+        information on solving problems for particular platforms.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        <emphasis role="bold">Perform any necessary post-installation
+        setup.</emphasis> After installing MySQL, read
+        <xref linkend="post-installation"/>. This section contains
+        important information about making sure the MySQL server is
+        working properly. It also describes how to secure the initial
+        MySQL user accounts, <emphasis>which have no
+        passwords</emphasis> until you assign passwords. The section
+        applies whether you install MySQL using a binary or source
+        distribution.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        If you want to run the MySQL benchmark scripts, Perl support for
+        MySQL must be available. See <xref linkend="perl-support"/>.
+      </para>
+    </listitem>
+
+  </orderedlist>
+
+  
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-generic-binary.xml"/>
+
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dynxml-local-installing-source.xml"/>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-updowngrade.xml"/>
+
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-windows.xml"/>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-linux.xml"/>
+
+  
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-macosx.xml"/>
+
+  
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-solaris.xml"/>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-i5os.xml"/>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-bsd.xml"/>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-hpux.xml"/>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-aix.xml"/>
+
+  
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-postinstall.xml"/>
+
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-envvar.xml"/>
+
+   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installing-windows.xml"/>
+
+
+  
+
+  
+
+
+
+
+
+  
+
+  
+
+</chapter>


Added: trunk/refman-5.1/installing-envvar.xml
===================================================================
--- trunk/refman-5.1/installing-envvar.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-envvar.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 400, Lines Deleted: 0; 12460 bytes

@@ -0,0 +1,400 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="environment-variables">
+
+    <title>Environment Variables</title>
+
+    <indexterm>
+      <primary>environment variables</primary>
+      <secondary>list of</secondary>
+    </indexterm>
+
+    <para>
+      This section lists all the environment variables that are used
+      directly or indirectly by MySQL. Most of these can also be found
+      in other places in this manual.
+    </para>
+
+    <para>
+      Note that any options on the command line take precedence over
+      values specified in option files and environment variables, and
+      values in option files take precedence over values in environment
+      variables.
+    </para>
+
+    <para>
+      In many cases, it is preferable to use an option file instead of
+      environment variables to modify the behavior of MySQL. See
+      <xref linkend="option-files"/>.
+    </para>
+
+    <indexterm>
+      <primary>CXX environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>CXX</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>CC environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>CC</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>CFLAGS environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>CFLAGS</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>CXXFLAGS environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>CXXFLAGS</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>DBI_USER environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>DBI_USER</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>DBI_TRACE environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>DBI_TRACE</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>HOME environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>HOME</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>LD_RUN_PATH environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>LD_RUN_PATH</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>MYSQL_DEBUG environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>MYSQL_DEBUG</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>MYSQL_GROUP_SUFFIX environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>MYSQL_GROUP_SUFFIX</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>MYSQL_HISTFILE environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>MYSQL_HISTFILE</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>MYSQL_HOME environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>MYSQL_HOME</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>MYSQL_HOST environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>MYSQL_HOST</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>MYSQL_PS1 environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>MYSQL_PS1</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>MYSQL_PWD environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>MYSQL_PWD</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>MYSQL_TCP_PORT environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>MYSQL_TCP_PORT</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>MYSQL_UNIX_PORT environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>MYSQL_UNIX_PORT</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>PATH environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>PATH</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>TMPDIR environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>TMPDIR</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>TZ environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>TZ</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>UMASK_DIR environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>UMASK_DIR</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>UMASK environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>UMASK</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>USER environment variable</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>environment variable</primary>
+      <secondary>USER</secondary>
+    </indexterm>
+
+    <informaltable>
+      <tgroup cols="2">
+        <colspec colwidth="25*"/>
+        <colspec colwidth="75*"/>
+        <tbody>
+          <row>
+            <entry><emphasis role="bold">Variable</emphasis></entry>
+            <entry><emphasis role="bold">Description</emphasis></entry>
+          </row>
+          <row>
+            <entry><literal>CXX</literal></entry>
+            <entry>The name of your C++ compiler (for running
+              <command>configure</command>).</entry>
+          </row>
+          <row>
+            <entry><literal>CC</literal></entry>
+            <entry>The name of your C compiler (for running <command>configure</command>).</entry>
+          </row>
+          <row>
+            <entry><literal>CFLAGS</literal></entry>
+            <entry>Flags for your C compiler (for running <command>configure</command>).</entry>
+          </row>
+          <row>
+            <entry><literal>CXXFLAGS</literal></entry>
+            <entry>Flags for your C++ compiler (for running <command>configure</command>).</entry>
+          </row>
+          <row>
+            <entry><literal>DBI_USER</literal></entry>
+            <entry>The default user name for Perl DBI.</entry>
+          </row>
+          <row>
+            <entry><literal>DBI_TRACE</literal></entry>
+            <entry>Trace options for Perl DBI.</entry>
+          </row>
+          <row>
+            <entry><literal>HOME</literal></entry>
+            <entry>The default path for the <command>mysql</command> history file is
+              <filename>$HOME/.mysql_history</filename>.</entry>
+          </row>
+          <row>
+            <entry><literal>LD_RUN_PATH</literal></entry>
+            <entry>Used to specify the location of <filename>libmysqlclient.so</filename>.</entry>
+          </row>
+          <row>
+            <entry><literal>MYSQL_DEBUG</literal></entry>
+            <entry>Debug trace options when debugging.</entry>
+          </row>
+          <row>
+            <entry><literal>MYSQL_GROUP_SUFFIX</literal></entry>
+            <entry>Option group suffix value (like specifying
+              <option role="general">--defaults-group-suffix</option>).</entry>
+          </row>
+          <row>
+            <entry><literal>MYSQL_HISTFILE</literal></entry>
+            <entry>The path to the <command>mysql</command> history file. If this variable
+              is set, its value overrides the default for
+              <filename>$HOME/.mysql_history</filename>.</entry>
+          </row>
+          <row>
+            <entry><literal>MYSQL_HOME</literal></entry>
+            <entry>The path to the directory in which the server-specific
+              <filename>my.cnf</filename> file resides (as of MySQL
+              5.0.3).</entry>
+          </row>
+          <row>
+            <entry><literal>MYSQL_HOST</literal></entry>
+            <entry>The default host name used by the <command>mysql</command> command-line
+              client.</entry>
+          </row>
+          <row>
+            <entry><literal>MYSQL_PS1</literal></entry>
+            <entry>The command prompt to use in the <command>mysql</command> command-line
+              client.</entry>
+          </row>
+          <row>
+            <entry><literal>MYSQL_PWD</literal></entry>
+            <entry>The default password when connecting to <command>mysqld</command>. Note
+              that using this is insecure. See
+              <xref linkend="password-security-user"/>.</entry>
+          </row>
+          <row>
+            <entry><literal>MYSQL_TCP_PORT</literal></entry>
+            <entry>The default TCP/IP port number.</entry>
+          </row>
+          <row>
+            <entry><literal>MYSQL_UNIX_PORT</literal></entry>
+            <entry>The default Unix socket file name; used for connections to
+              <literal>localhost</literal>.</entry>
+          </row>
+          <row>
+            <entry><literal>PATH</literal></entry>
+            <entry>Used by the shell to find MySQL programs.</entry>
+          </row>
+          <row>
+            <entry><literal>TMPDIR</literal></entry>
+            <entry>The directory where temporary files are created.</entry>
+          </row>
+          <row>
+            <entry><literal>TZ</literal></entry>
+            <entry>This should be set to your local time zone. See
+              <xref linkend="timezone-problems"/>.</entry>
+          </row>
+          <row>
+            <entry><literal>UMASK</literal></entry>
+            <entry>The user-file creation mode when creating files. See note following
+              table.</entry>
+          </row>
+          <row>
+            <entry><literal>UMASK_DIR</literal></entry>
+            <entry>The user-directory creation mode when creating directories. See note
+              following table.</entry>
+          </row>
+          <row>
+            <entry><literal>USER</literal></entry>
+            <entry>The default user name on Windows and NetWare used when connecting to
+              <command>mysqld</command>.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para>
+      The <literal>UMASK</literal> and <literal>UMASK_DIR</literal>
+      variables, despite their names, are used as modes, not masks:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          If <literal>UMASK</literal> is set, <command>mysqld</command>
+          uses <literal>($UMASK | 0600)</literal> as the mode for file
+          creation, so that newly created files have a mode in the range
+          from 0600 to 0666 (all values octal).
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          If <literal>UMASK_DIR</literal> is set,
+          <command>mysqld</command> uses <literal>($UMASK_DIR |
+          0700)</literal> as the base mode for directory creation, which
+          then is AND-ed with <literal>~(~$UMASK &amp; 0666)</literal>,
+          so that newly created directories have a mode in the range
+          from 0700 to 0777 (all values octal). The AND operation may
+          remove read and write permissions from the directory mode, but
+          not execute permissions.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
+      MySQL assumes that the value for <literal>UMASK</literal> or
+      <literal>UMASK_DIR</literal> is in octal if it starts with a zero.
+    </para>
+
+  </section>


Added: trunk/refman-5.1/installing-general.xml
===================================================================
--- trunk/refman-5.1/installing-general.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-general.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 1715, Lines Deleted: 0; 62362 bytes

@@ -0,0 +1,1715 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="general-installation-issues">
+
+    <title>General Installation Guidance</title>
+
+    <para>
+      The immediately following sections contain the information
+      necessary to choose, download, and verify your distribution. The
+      instructions in later sections of the chapter describe how to
+      install the distribution that you choose. For binary
+      distributions, see the instructions at
+      <xref linkend="installing-binary"/> or the corresponding section for your platform if available. To build MySQL from
+      source, use the instructions in
+      <xref linkend="installing-source"/>.
+    </para>
+
+    <section id="supported-os">
+
+      <title>Operating Systems Supported by MySQL Community Server</title>
+
+      <indexterm>
+        <primary>operating systems</primary>
+        <secondary>supported</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>native thread support</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>thread support</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>process support</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>support</primary>
+        <secondary>for operating systems</secondary>
+      </indexterm>
+
+      <para>
+        This section lists the operating systems on which MySQL
+        Community Server is known to run.
+      </para>
+
+      <important>
+        <para>
+          Sun Microsystems, Inc. does not necessarily provide official
+          support for all the platforms listed in this section. For
+          information about those platforms that are officially
+          supported, see
+          <ulink url="http://www.mysql.com/support/supportedplatforms.html">MySQL
+          Server Supported Platforms</ulink> on the MySQL Web site.
+        </para>
+      </important>
+
+      <para>
+        We use GNU Autoconf, so it is possible to port MySQL to all
+        modern systems that have a C++ compiler and a working
+        implementation of POSIX threads. (Thread support is needed for
+        the server. To compile only the client code, the only
+        requirement is a C++ compiler.)
+      </para>
+
+      <para>
+        MySQL has been reported to compile successfully on the following
+        combinations of operating system and thread package.
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            AIX 4.x, 5.x with native threads. See
+            <xref linkend="ibm-aix"/>. AIX 5.3 should be upgraded to
+            technology level 7 (5300-07).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            FreeBSD 5.x and up with native threads. See <xref linkend="mysql-installation-freebsd"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            HP-UX 11.x with the native threads. See
+            <xref linkend="mysql-installation-hpux"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Linux, builds on all fairly recent Linux distributions with
+            <literal>glibc</literal> 2.3. See <xref linkend="linux"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Mac OS X. See <xref linkend="mac-os-x"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Solaris 2.8 on SPARC and x86, including support for native threads.
+            See <xref linkend="solaris"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Windows 2000, Windows XP, Windows Vista, Windows Server
+            2003, and Windows Server 2008. See
+            <xref linkend="windows-installation"/>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        MySQL has also been known to run on other systems in the past.
+        See <xref linkend="operating-system-specific-notes"/>. Some
+        porting effort might be required for current versions of MySQL
+        on these systems.
+      </para>
+
+      <para>
+        Not all platforms are equally well-suited for running MySQL. How
+        well a certain platform is suited for a high-load
+        mission-critical MySQL server is determined by the following
+        factors:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            General stability of the thread library. A platform may have
+            an excellent reputation otherwise, but MySQL is only as
+            stable as the thread library it calls, even if everything
+            else is perfect.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            The capability of the kernel and the thread library to take
+            advantage of symmetric multi-processor (SMP) systems. In
+            other words, when a process creates a thread, it should be
+            possible for that thread to run on a CPU different from the
+            original process.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            The capability of the kernel and the thread library to run
+            many threads that acquire and release a mutex over a short
+            critical region frequently without excessive context
+            switches. If the implementation of
+            <literal>pthread_mutex_lock()</literal> is too anxious to
+            yield CPU time, this hurts MySQL tremendously. If this issue
+            is not taken care of, adding extra CPUs actually makes MySQL
+            slower.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            General file system stability and performance.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Table size. If your tables are large, performance is
+            affected by the ability of the file system to deal with
+            large files and dealing with them efficiently.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Our level of expertise here at Sun Microsystems, Inc. with
+            the platform. If we know a platform well, we enable
+            platform-specific optimizations and fixes at compile time.
+            We can also provide advice on configuring your system
+            optimally for MySQL.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            The amount of testing we have done internally for similar
+            configurations.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            The number of users that have run MySQL successfully on the
+            platform in similar configurations. If this number is high,
+            the likelihood of encountering platform-specific surprises
+            is much smaller.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+    </section>
+
+    <section id="which-version">
+
+      <title>Choosing Which MySQL Distribution to Install</title>
+
+      <remark role="todo">
+        We need to define what a "release" is; that is, when we assign a
+        new version number and produce distributions that users can grab
+        and install. Also, define "release series", and "distribution"
+        (an installable package).
+      </remark>
+
+      <para>
+        When preparing to install MySQL, you should decide which version
+        to use. MySQL development occurs in several release series, and
+        you can pick the one that best fits your needs. After deciding
+        which version to install, you can choose a distribution format.
+        Releases are available in binary or source format.
+      </para>
+
+      <indexterm>
+        <primary>MySQL binary distribution</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>MySQL source distribution</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>release numbers</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>version</primary>
+        <secondary>choosing</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>choosing</primary>
+        <secondary>a MySQL version</secondary>
+      </indexterm>
+
+      <section id="choosing-version">
+
+        <title>Choosing Which Version of MySQL to Install</title>
+
+        <para>
+          The first decision to make is whether you want to use a
+          production (stable) release or a development release. In the
+          MySQL development process, multiple release series co-exist,
+          each at a different stage of maturity:
+        </para>
+
+        <itemizedlist>
+
+          <remark role="note">
+            These series numbers cannot be given using the
+            current-series, previous-series, next-series entities.
+          </remark>
+
+          <listitem>
+            <para>
+              MySQL 5.4 is the current development release series.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              MySQL 5.1 is the current General Availability (Production)
+              release series. New releases are issued for bugfixes only;
+              no new features are being added that could affect
+              stability.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              MySQL 5.0 is the previous stable (production-quality)
+              release series.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              MySQL 4.1, 4.0, and 3.23 are old stable
+              (production-quality) release series. MySQL 4.1 is now at
+              the end of the product lifecycle. Active development and
+              support for these versions has ended.
+            </para>
+
+            <para>
+              Extended support for MySQL 4.1 remains available.
+              According to the
+              <ulink url="http://www.mysql.com/about/legal/lifecycle/">MySQL
+              Lifecycle Policy</ulink>, only Security and Severity Level
+              1 issues are still being fixed for MySQL 4.1.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          We do not believe in a complete code freeze because this
+          prevents us from making bugfixes and other fixes that must be
+          done. By <quote>somewhat frozen</quote> we mean that we may
+          add small things that should not affect anything that
+          currently works in a production release. Naturally, relevant
+          bugfixes from an earlier series propagate to later series.
+        </para>
+
+        <para>
+          Normally, if you are beginning to use MySQL for the first time
+          or trying to port it to some system for which there is no
+          binary distribution, go with the General Availability release
+          series. Currently, this is MySQL 5.1. All MySQL releases, even
+          those from development series, are checked with the MySQL
+          benchmarks and an extensive test suite before being issued.
+        </para>
+
+        <para>
+          If you are running an older system and want to upgrade, but do
+          not want to take the chance of having a nonseamless upgrade,
+          you should upgrade to the latest version in the same release
+          series you are using (where only the last part of the version
+          number is newer than yours). We have tried to fix only fatal
+          bugs and make only small, relatively <quote>safe</quote>
+          changes to that version.
+        </para>
+
+        <para>
+          If you want to use new features not present in the production
+          release series, you can use a version from a development
+          series. Note that development releases are not as stable as
+          production releases.
+        </para>
+
+        <para>
+          If you want to use the very latest sources containing all
+          current patches and bugfixes, you can use one of our Bazaar
+          repositories. These are not <quote>releases</quote> as such,
+          but are available as previews of the code on which future
+          releases are to be based.
+        </para>
+
+        <indexterm>
+          <primary>naming</primary>
+          <secondary>releases of MySQL</secondary>
+        </indexterm>
+
+        <indexterm>
+          <primary>releases</primary>
+          <secondary>naming scheme</secondary>
+        </indexterm>
+
+        <para>
+          The MySQL naming scheme uses release names that consist of
+          three numbers and a suffix; for example,
+          <emphasis role="bold">mysql-5.0.12-beta</emphasis>. The
+          numbers within the release name are interpreted as follows:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              The first number (<emphasis role="bold">5</emphasis>) is
+              the major version and describes the file format. All MySQL
+              5 releases have the same file format.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The second number (<emphasis role="bold">0</emphasis>) is
+              the release level. Taken together, the major version and
+              release level constitute the release series number.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The third number (<emphasis role="bold">12</emphasis>) is
+              the version number within the release series. This is
+              incremented for each new release. Usually you want the
+              latest version for the series you have chosen.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          For each minor update, the last number in the version string
+          is incremented. When there are major new features or minor
+          incompatibilities with previous versions, the second number in
+          the version string is incremented. When the file format
+          changes, the first number is increased.
+        </para>
+
+        <para>
+          Release names also include a suffix to indicates the stability
+          level of the release. Releases within a series progress
+          through a set of suffixes to indicate how the stability level
+          improves. The possible suffixes are:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">alpha</emphasis> indicates that the
+              release is for preview purposes only. Known bugs should be
+              documented in the News section (see
+              <xref linkend="news"/>). Most alpha releases implement new
+              commands and extensions. Active development that may
+              involve major code changes can occur in an alpha release.
+              However, we do conduct testing before issuing a release.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">beta</emphasis> indicates that the
+              release is appropriate for use with new development.
+              Within beta releases, the features and compatibility
+              should remain consistent. However, beta releases may
+              contain numerous and major unaddressed bugs.
+            </para>
+
+            <para>
+              All APIs, externally visible structures, and columns for
+              SQL statements will not change during future beta, release
+              candidate, or production releases.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">rc</emphasis> indicates a Release
+              Candidate. Release candidates are believed to be stable,
+              having passed all of MySQL's internal testing, and with
+              all known fatal runtime bugs fixed. However, the release
+              has not been in widespread use long enough to know for
+              sure that all bugs have been identified. Only minor fixes
+              are added. (A release candidate is what formerly was known
+              as a gamma release.)
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              If there is no suffix, it indicates that the release is a
+              General Availability (GA) or Production release. GA
+              releases are stable, having successfully passed through
+              all earlier release stages and are believed to be
+              reliable, free of serious bugs, and suitable for use in
+              production systems. Only critical bugfixes are applied to
+              the release.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          MySQL uses a naming scheme that is slightly different from
+          most other products. In general, it is usually safe to use any
+          version that has been out for a couple of weeks without being
+          replaced by a new version within the same release series.
+        </para>
+
+        <para>
+          All releases of MySQL are run through our standard tests and
+          benchmarks to ensure that they are relatively safe to use.
+          Because the standard tests are extended over time to check for
+          all previously found bugs, the test suite keeps getting
+          better.
+        </para>
+
+        <indexterm>
+          <primary>releases</primary>
+          <secondary>testing</secondary>
+        </indexterm>
+
+        <indexterm>
+          <primary>testing</primary>
+          <secondary>of MySQL releases</secondary>
+        </indexterm>
+
+        <para>
+          All releases have been tested at least with these tools:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              An internal test suite
+            </para>
+
+            <para>
+              The <filename>mysql-test</filename> directory contains an
+              extensive set of test cases. We run these tests for every
+              server binary. See <xref linkend="mysql-test-suite"/>, for
+              more information about this test suite.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The MySQL benchmark suite
+            </para>
+
+            <para>
+              This suite runs a range of common queries. It is also a
+              test to determine whether the latest batch of
+              optimizations actually made the code faster. See
+              <xref linkend="mysql-benchmarks"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The <literal>crash-me</literal> test
+            </para>
+
+            <para>
+              This test tries to determine what features the database
+              supports and what its capabilities and limitations are.
+              See <xref linkend="mysql-benchmarks"/>.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          We also test the newest MySQL version in our internal
+          production environment, on at least one machine. We have more
+          than 100GB of data to work with.
+        </para>
+
+      </section>
+
+      <section id="choosing-distribution-format">
+
+        <title>Choosing a Distribution Format</title>
+
+        <para>
+          After choosing which version of MySQL to install, you should
+          decide whether to use a binary distribution or a source
+          distribution. In most cases, you should probably use a binary
+          distribution, if one exists for your platform. Binary
+          distributions are available in native format for many
+          platforms, such as RPM files for Linux or PKG package
+          installers for Mac OS X or Solaris. Distributions also are
+          available as Zip archives or compressed <command>tar</command>
+          files.
+        </para>
+
+        <para>
+          Reasons to choose a binary distribution include the following:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              Binary distributions generally are easier to install than
+              source distributions.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              To satisfy different user requirements, we provide several
+              servers in binary distributions. <command>mysqld</command>
+              is an optimized server that is a smaller, faster binary.
+              <command>mysqld-debug</command> is compiled with debugging
+              support.
+            </para>
+
+            <para>
+              Each of these servers is compiled from the same source
+              distribution, though with different configuration options.
+              All native MySQL clients can connect to servers from
+              either MySQL version.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          Under some circumstances, you may be better off installing
+          MySQL from a source distribution:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              You want to install MySQL at some explicit location. The
+              standard binary distributions are ready to run at any
+              installation location, but you might require even more
+              flexibility to place MySQL components where you want.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              You want to configure <command>mysqld</command> to ensure
+              that features are available that might not be included in
+              the standard binary distributions. Here is a list of the
+              most common extra options that you may want to use to
+              ensure feature availability:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  <option>--with-libwrap</option>
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <option>--with-named-z-libs</option> (this is done for
+                  some of the binaries)
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <option role="configure">--with-debug[=full]</option>
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </listitem>
+
+          <listitem>
+            <para>
+              You want to configure <command>mysqld</command> without
+              some features that are included in the standard binary
+              distributions. For example, distributions normally are
+              compiled with support for all character sets. If you want
+              a smaller MySQL server, you can recompile it with support
+              for only the character sets you need.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              You have a special compiler (such as
+              <literal>pgcc</literal>) or want to use compiler options
+              that are better optimized for your processor. Binary
+              distributions are compiled with options that should work
+              on a variety of processors from the same processor family.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              You want to use the latest sources from one of the Bazaar
+              repositories to have access to all current bugfixes. For
+              example, if you have found a bug and reported it to the
+              MySQL development team, the bugfix is committed to the
+              source repository and you can access it there. The bugfix
+              does not appear in a release until a release actually is
+              issued.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              You want to read (or modify) the C and C++ code that makes
+              up MySQL. For this purpose, you should get a source
+              distribution, because the source code is always the
+              ultimate manual.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Source distributions contain more tests and examples than
+              binary distributions.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+      </section>
+
+      <section id="many-versions">
+
+        <title>How and When Updates Are Released</title>
+
+        <indexterm>
+          <primary>releases</primary>
+          <secondary>updating</secondary>
+        </indexterm>
+
+        <indexterm>
+          <primary>updating</primary>
+          <secondary>releases of MySQL</secondary>
+        </indexterm>
+
+        <para>
+          MySQL is evolving quite rapidly and we want to share new
+          developments with other MySQL users. We try to produce a new
+          release whenever we have new and useful features that others
+          also seem to have a need for.
+        </para>
+
+        <para>
+          We also try to help users who request features that are easy
+          to implement. We take note of what our licensed users want,
+          and we especially take note of what our support customers want
+          and try to help them in this regard.
+        </para>
+
+        <para>
+          No one is <emphasis>required</emphasis> to download a new
+          release. The News section helps you determine whether the new
+          release has something you really want. See
+          <xref linkend="news"/>.
+        </para>
+
+        <para>
+          We use the following policy when updating MySQL:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              Enterprise Server releases are meant to appear every 18
+              months, supplemented by quarterly service packs and
+              monthly rapid updates. Community Server releases are meant
+              to appear 2&minus;3 times per year.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Releases are issued within each series. For each release,
+              the last number in the version is one more than the
+              previous release within the same series.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Binary distributions for some platforms are made by us for
+              major releases. Other people may make binary distributions
+              for other systems, but probably less frequently.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              We make fixes available as soon as we have identified and
+              corrected small or noncritical but annoying bugs. The
+              fixes are available in source form immediately from our
+              public Bazaar repositories, and are included in the next
+              release.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              If by any chance a security vulnerability or critical bug
+              is found in a release, our policy is to fix it in a new
+              release as soon as possible. (We would like other
+              companies to do this, too!)
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+      </section>
+
+<!--
+      <section id="release-philosophy">
+
+        <title>Release Philosophy&mdash;No Known Bugs in Releases</title>
+
+        <para>
+          We put considerable time and effort into making our releases
+          bug-free. Our policy is never to release a version of MySQL
+          intended for production use that has any known fatal,
+          repeatable bugs.
+        </para>
+
+        <para>
+          We have documented all open problems, bugs, and issues that
+          are dependent on design decisions. See <xref linkend="bugs"/>.
+        </para>
+
+        <para>
+          Our aim is to fix everything that is fixable without making a
+          stable MySQL version less stable. In certain cases, this means
+          we can fix an issue in the development versions, but not in
+          the stable (production) version. Naturally, we document such
+          issues so that users are aware of them.
+        </para>
+
+        <para>
+          Here is a description of our build process:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              We monitor bugs from our customer support list, the bugs
+              database at <ulink url="http://bugs.mysql.com/"/>, and the
+              MySQL external mailing lists.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              All reported bugs for live versions are entered into the
+              bugs database.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              When we fix a bug, we always try to make a test case for
+              it and include it into our test system to ensure that the
+              bug can never recur without being detected. (About 90% of
+              all fixed bugs have test cases.)
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              We create test cases for each new feature that we add to
+              MySQL.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Before we start to build a new MySQL release, we ensure
+              that all reported repeatable bugs for that MySQL version
+              (3.23.x, 4.0.x, 4.1.x, 5.0.x, 5.1.x, and so on) are fixed.
+              If something is impossible to fix due to some internal
+              design decision in MySQL, we document this in the manual.
+              See <xref linkend="bugs"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              We do a build on all platforms for which we support
+              binaries and run our test suite and benchmark suite on all
+              of them.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              We do not publish a binary for a platform for which the
+              test or benchmark suite fails. If the problem is due to a
+              general error in the source, we fix it and do the build
+              plus tests on all systems again from scratch.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The build and test process takes a week. If we receive a
+              report regarding a fatal bug during this process (for
+              example, one that causes a core dump), we fix the problem
+              and restart the build process.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              After publishing the binaries on
+              <ulink url="http://dev.mysql.com/"/>, we send out an
+              announcement message to the <literal>mysql</literal> and
+              <literal>announce</literal> mailing lists. See
+              <xref linkend="mailing-lists"/>. The announcement message
+              contains a list of all changes to the release and any
+              known problems with the release. The
+              <emphasis role="bold">Known Problems</emphasis> section in
+              the release notes has been needed for only a handful of
+              releases.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              To quickly give our users access to the latest MySQL
+              features, we try to produce a new MySQL release every 4 to 8
+              weeks. Source code snapshots are built daily and are
+              available at
+              <ulink url="http://downloads.mysql.com/snapshots.php"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              If, despite our best efforts, we receive any bug reports
+              after a release is issued that a critical problem exists
+              for the build on a specific platform, we fix it at once
+              and build a new <literal>'a'</literal> release for that
+              platform. Thanks to our large user base, problems are
+              found and resolved very quickly.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Our track record for making stable releases is quite good.
+              In the last 150 releases, we had to do a new build for
+              fewer than 10 of them. In three of these cases, the bug
+              was a faulty <literal>glibc</literal> library on one of
+              our build machines that took us a long time to track down.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+      </section>
+-->
+
+      
+
+    </section>
+
+    <section id="getting-mysql">
+
+      <title>How to Get MySQL</title>
+
+      <indexterm>
+        <primary>downloading</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>MySQL version</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>version</primary>
+        <secondary>latest</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>getting MySQL</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>mirror sites</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>URLs for downloading MySQL</primary>
+      </indexterm>
+
+      <para>
+        Check our downloads page at <ulink url="&base-url-downloads;"/>
+        for information about the current version of MySQL and for
+        downloading instructions. For a complete up-to-date list of
+        MySQL download mirror sites, see
+        <ulink url="&base-url-downloads;mirrors.html"/>. You can also
+        find information there about becoming a MySQL mirror site and
+        how to report a bad or out-of-date mirror.
+      </para>
+
+      <para>
+        Our main mirror is located at
+        <ulink url="http://mirrors.sunsite.dk/mysql/"/>.
+      </para>
+
+    </section>
+
+    <section id="verifying-package-integrity">
+
+      <title>Verifying Package Integrity Using MD5 Checksums or
+        <literal>GnuPG</literal></title>
+
+      <para>
+        After you have downloaded the MySQL package that suits your
+        needs and before you attempt to install it, you should make sure
+        that it is intact and has not been tampered with. There are
+        three means of integrity checking:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            MD5 checksums
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Cryptographic signatures using <literal>GnuPG</literal>, the
+            GNU Privacy Guard
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            For RPM packages, the built-in RPM integrity verification
+            mechanism
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        The following sections describe how to use these methods.
+      </para>
+
+      <para>
+        If you notice that the MD5 checksum or GPG signatures do not
+        match, first try to download the respective package one more
+        time, perhaps from another mirror site. If you repeatedly cannot
+        successfully verify the integrity of the package, please notify
+        us about such incidents, including the full package name and the
+        download site you have been using, at
+        <email>webmaster@stripped</email> or
+        <email>build@stripped</email>. Do not report downloading
+        problems using the bug-reporting system.
+      </para>
+
+      <section id="verifying-md5-checksum">
+
+        <title>Verifying the MD5 Checksum</title>
+
+        <para>
+          After you have downloaded a MySQL package, you should make
+          sure that its MD5 checksum matches the one provided on the
+          MySQL download pages. Each package has an individual checksum
+          that you can verify with the following command, where
+          <replaceable>package_name</replaceable> is the name of the
+          package you downloaded:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>md5sum <replaceable>package_name</replaceable></userinput>
+</programlisting>
+
+        <para>
+          Example:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>md5sum mysql-standard-&current-version;-linux-i686.tar.gz</userinput>
+aaab65abbec64d5e907dcd41b8699945  mysql-standard-&current-version;-linux-i686.tar.gz
+</programlisting>
+
+        <para>
+          You should verify that the resulting checksum (the string of
+          hexadecimal digits) matches the one displayed on the download
+          page immediately below the respective package.
+        </para>
+
+        <note>
+          <para>
+            Make sure to verify the checksum of the <emphasis>archive
+            file</emphasis> (for example, the <filename>.zip</filename>
+            or <filename>.tar.gz</filename> file) and not of the files
+            that are contained inside of the archive.
+          </para>
+        </note>
+
+        <para>
+          Note that not all operating systems support the
+          <command>md5sum</command> command. On some, it is simply
+          called <command>md5</command>, and others do not ship it at
+          all. On Linux, it is part of the <emphasis role="bold">GNU
+          Text Utilities</emphasis> package, which is available for a
+          wide range of platforms. You can download the source code from
+          <ulink url="http://www.gnu.org/software/textutils/"/> as well.
+          If you have OpenSSL installed, you can use the command
+          <command>openssl md5
+          <replaceable>package_name</replaceable></command> instead. A
+          Windows implementation of the <command>md5</command> command
+          line utility is available from
+          <ulink url="http://www.fourmilab.ch/md5/"/>.
+          <command>winMd5Sum</command> is a graphical MD5 checking tool
+          that can be obtained from
+          <ulink url="http://www.nullriver.com/index/products/winmd5sum"/>.
+        </para>
+
+      </section>
+
+      <section id="checking-gpg-signature">
+
+        <title>Signature Checking Using <literal>GnuPG</literal></title>
+
+        <para>
+          Another method of verifying the integrity and authenticity of
+          a package is to use cryptographic signatures. This is more
+          reliable than using MD5 checksums, but requires more work.
+        </para>
+
+        <para>
+          We sign MySQL downloadable packages with
+          <command>GnuPG</command> (GNU Privacy Guard).
+          <command>GnuPG</command> is an Open Source alternative to the
+          well-known Pretty Good Privacy (<command>PGP</command>) by
+          Phil Zimmermann. See <ulink url="http://www.gnupg.org/"/> for
+          more information about <command>GnuPG</command> and how to
+          obtain and install it on your system. Most Linux distributions
+          ship with <command>GnuPG</command> installed by default. For
+          more information about <command>GnuPG</command>, see
+          <ulink url="http://www.openpgp.org/"/>.
+        </para>
+
+        <remark>
+          Do not use @email with the key name, that comes out as
+          &lt;...&gt; in some output formats, which are not part of the
+          key name.
+        </remark>
+
+        <para>
+          To verify the signature for a specific package, you first need
+          to obtain a copy of our public GPG build key, which you can
+          download from <ulink url="http://keyserver.pgp.com/"/>. The
+          key that you want to obtain is named
+          <literal>build@stripped</literal>. Alternatively, you can cut
+          and paste the key directly from the following text:
+        </para>
+
+<programlisting>
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.0.6 (GNU/Linux)
+Comment: For info see http://www.gnupg.org
+
+mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
+RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
+fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3
+BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW
+hxwR9pRWVArNYJdDRT+rf2RUe3vpquKNQU/hnEIUHJRQqYHo8gTxvxXNQc7fJYLV
+K2HtkrPbP72vwsEKMYhhr0eKCbtLGfls9krjJ6sBgACyP/Vb7hiPwxh6rDZ7ITnE
+kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI
+QJEXM6FSbi0LLtZciNlYsafwAPEOMDKpMqAK6IyisNtPvaLd8lH0bPAnWqcyefep
+rv0sxxqUEMcM3o7wwgfN83POkDasDbs3pjwPhxvhz6//62zQJ7Q7TXlTUUwgUGFj
+a2FnZSBzaWduaW5nIGtleSAod3d3Lm15c3FsLmNvbSkgPGJ1aWxkQG15c3FsLmNv
+bT6IXQQTEQIAHQUCR6yUtAUJDTBYqAULBwoDBAMVAwIDFgIBAheAAAoJEIxxjTtQ
+cuH1rpIAn38+BlBI815Dou9VXMIAsQEk4G3tAJ9+Cz69Y/Xwm611lzteJrCAA32+
+aYhMBBMRAgAMBQI+PqPRBYMJZgC7AAoJEElQ4SqycpHyJOEAn1mxHijft00bKXvu
+cSo/pECUmppiAJ41M9MRVj5VcdH/KN/KjRtW6tHFPYhMBBMRAgAMBQI+QoIDBYMJ
+YiKJAAoJELb1zU3GuiQ/lpEAoIhpp6BozKI8p6eaabzF5MlJH58pAKCu/ROofK8J
+Eg2aLos+5zEYrB/LsohGBBARAgAGBQI/rOOvAAoJEK/FI0h4g3QP9pYAoNtSISDD
+AAU2HafyAYlLD/yUC4hKAJ0czMsBLbo0M/xPaJ6Ox9Q5Hmw2uIhGBBARAgAGBQI/
+tEN3AAoJEIWWr6swc05mxsMAnRag9X61Ygu1kbfBiqDku4czTd9pAJ4q5W8KZ0+2
+ujTrEPN55NdWtnXj4YhGBBARAgAGBQJDW7PqAAoJEIvYLm8wuUtcf3QAnRCyqF0C
+pMCTdIGc7bDO5I7CIMhTAJ0UTGx0O1d/VwvdDiKWj45N2tNbYIhGBBMRAgAGBQJE
+8TMmAAoJEPZJxPRgk1MMCnEAoIm2pP0sIcVh9Yo0YYGAqORrTOL3AJwIbcy+e8HM
+NSoNV5u51RnrVKie34hMBBARAgAMBQJBgcsBBYMGItmLAAoJEBhZ0B9ne6HsQo0A
+nA/LCTQ3P5kvJvDhg1DsfVTFnJxpAJ49WFjg/kIcaN5iP1JfaBAITZI3H4hMBBAR
+AgAMBQJBgcs0BYMGItlYAAoJEIHC9+viE7aSIiMAnRVTVVAfMXvJhV6D5uHfWeeD
+046TAJ4kjwP2bHyd6DjCymq+BdEDz63axohMBBARAgAMBQJBgctiBYMGItkqAAoJ
+EGtw7Nldw/RzCaoAmwWM6+Rj1zl4D/PIys5nW48Hql3hAJ0bLOBthv96g+7oUy9U
+j09Uh41lF4hMBBARAgAMBQJB0JMkBYMF1BFoAAoJEH0lygrBKafCYlUAoIb1r5D6
+qMLMPMO1krHk3MNbX5b5AJ4vryx5fw6iJctC5GWJ+Y8ytXab34hMBBARAgAMBQJC
+K1u6BYMFeUjSAAoJEOYbpIkV67mr8xMAoJMy+UJC0sqXMPSxh3BUsdcmtFS+AJ9+
+Z15LpoOnAidTT/K9iODXGViK6ohMBBIRAgAMBQJAKlk6BYMHektSAAoJEDyhHzSU
++vhhJlwAnA/gOdwOThjO8O+dFtdbpKuImfXJAJ0TL53QKp92EzscZSz49lD2YkoE
+qohMBBIRAgAMBQJAPfq6BYMHZqnSAAoJEPLXXGPjnGWcst8AoLQ3MJWqttMNHDbl
+xSyzXhFGhRU8AJ4ukRzfNJqElQHQ00ZM2WnCVNzOUIhMBBIRAgAMBQJBDgqEBYMG
+lpoIAAoJEDnKK/Q9aopf/N0AniE2fcCKO1wDIwusuGVlC+JvnnWbAKDDoUSEYuNn
+5qzRbrzWW5zBno/Nb4hMBBIRAgAMBQJCgKU0BYMFI/9YAAoJEAQNwIV8g5+o4yQA
+nA9QOFLV5POCddyUMqB/fnctuO9eAJ4sJbLKP/Z3SAiTpKrNo+XZRxauqIhMBBMR
+AgAMBQI+TU2EBYMJV1cIAAoJEC27dr+t1MkzBQwAoJU+RuTVSn+TI+uWxUpT82/d
+s5NkAJ9bnNodffyMMK7GyMiv/TzifiTD+4hMBBMRAgAMBQJB14B2BYMFzSQWAAoJ
+EGbv28jNgv0+P7wAn13uu8YkhwfNMJJhWdpK2/qM/4AQAJ40drnKW2qJ5EEIJwtx
+pwapgrzWiYhMBBMRAgAMBQJCGIEOBYMFjCN+AAoJEHbBAxyiMW6hoO4An0Ith3Kx
+5/sixbjZR9aEjoePGTNKAJ94SldLiESaYaJx2lGIlD9bbVoHQYhdBBMRAgAdBQJH
+rJTPBQkNMFioBQsHCgMEAxUDAgMWAgECF4AACgkQjHGNO1By4fV0KgCgsLpG2wP0
+rc3s07Fync9g7MfairMAoIUefSNKrGTsTxvLeyH4DLzJW/QFiHsEMBECADsFAkJ3
+NfU0HQBPb3BzLi4uIHNob3VsZCBoYXZlIGJlZW4gbG9jYWwhIEknbSAqc28qIHN0
+dXBpZC4uLgAKCRA5yiv0PWqKX+9HAJ0WjTx/rqgouK4QCrOV/2IOU+jMQQCfYSC8
+JgsIIeN8aiyuStTdYrk0VWCIjwQwEQIATwUCRW8Av0gdAFNob3VsZCBoYXZlIGJl
+ZW4gYSBsb2NhbCBzaWduYXR1cmUsIG9yIHNvbWV0aGluZyAtIFdURiB3YXMgSSB0
+aGlua2luZz8ACgkQOcor9D1qil+g+wCfcFWoo5qUl4XTE9K8tH3Q+xGWeYYAnjii
+KxjtOXc0ls+BlqXxbfZ9uqBsiQIiBBABAgAMBQJBgcuFBYMGItkHAAoJEKrj5s5m
+oURoqC8QAIISudocbJRhrTAROOPoMsReyp46Jdp3iL1oFDGcPfkZSBwWh8L+cJjh
+dycIwwSeZ1D2h9S5Tc4EnoE0khsS6wBpuAuih5s//coRqIIiLKEdhTmNqulkCH5m
+imCzc5zXWZDW0hpLr2InGsZMuh2QCwAkB4RTBM+r18cUXMLV4YHKyjIVaDhsiPP/
+MKUj6rJNsUDmDq1GiJdOjySjtCFjYADlQYSD7zcd1vpqQLThnZBESvEoCqumEfOP
+xemNU6xAB0CL+pUpB40pE6Un6Krr5h6yZxYZ/N5vzt0Y3B5UUMkgYDSpjbulNvaU
+TFiOxEU3gJvXc1+h0BsxM7FwBZnuMA8LEA+UdQb76YcyuFBcROhmcEUTiducLu84
+E2BZ2NSBdymRQKSinhvXsEWlH6Txm1gtJLynYsvPi4B4JxKbb+awnFPusL8W+gfz
+jbygeKdyqzYgKj3M79R3geaY7Q75Kxl1UogiOKcbI5VZvg47OQCWeeERnejqEAdx
+EQiwGA/ARhVOP/1l0LQA7jg2P1xTtrBqqC2ufDB+v+jhXaCXxstKSW1lTbv/b0d6
+454UaOUV7RisN39pE2zFvJvY7bwfiwbUJVmYLm4rWJAEOJLIDtDRtt2h8JahDObm
+3CWkpadjw57S5v1c/mn+xV9yTgVx5YUfC/788L1HNKXfeVDq8zbAiQIiBBMBAgAM
+BQJCnwocBYMFBZpwAAoJENjCCglaJFfPIT4P/25zvPp8ixqV85igs3rRqMBtBsj+
+5EoEW6DJnlGhoi26yf1nasC2frVasWG7i4JIm0U3WfLZERGDjR/nqlOCEqsP5gS3
+43N7r4UpDkBsYh0WxH/ZtST5llFK3zd7XgtxvqKL98l/OSgijH2W2SJ9DGpjtO+T
+iegq7igtJzw7Vax9z/LQH2xhRQKZR9yernwMSYaJ72i9SyWbK3k0+e95fGnlR5pF
+zlGq320rYHgD7v9yoQ2t1klsAxK6e3b7Z+RiJG6cAU8o8F0kGxjWzF4v8D1op7S+
+IoRdB0Bap01ko0KLyt3+g4/33/2UxsW50BtfqcvYNJvU4bZns1YSqAgDOOanBhg8
+Ip5XPlDxH6J/3997n5JNj/nk5ojfd8nYfe/5TjflWNiput6tZ7frEki1wl6pTNbv
+V9C1eLUJMSXfDZyHtUXmiP9DKNpsucCUeBKWRKLqnsHLkLYydsIeUJ8+ciKc+EWh
+FxEY+Ml72cXAaz5BuW9L8KHNzZZfez/ZJabiARQpFfjOwAnmhzJ9r++TEKRLEr96
+taUI9/8nVPvT6LnBpcM38Td6dJ639YvuH3ilAqmPPw50YvglIEe4BUYD5r52Seqc
+8XQowouGOuBX4vs7zgWFuYA/s9ebfGaIw+uJd/56Xl9ll6q5CghqB/yt1EceFEnF
+CAjQc2SeRo6qzx22uQINBD4+ox0QCADv4Yl/Fsx1jjCyU+eMf2sXg3ap9awQ3+XF
+pmglhzdrozTZYKceXpqFPb+0ErbDVAjhgW15HjuAK+2Bvo7Ukd986jYd8uZENGJG
+N3UNMIep7JfsIeFyCGP901GVbZnSXlAURyZX1TRWGndoV9YLhSN+zctT6GQBbMTv
+NoPlwf0nvK//rG5lXDjXXHSHhSqxNxYy7SIzUHMQupfUNjsvCg8Rv871GRt/h+Yt
+7XUTMhoJrg+oBFdBlzh2FKKcy3ordfgGtGwpN+jMG7vgXjsPwiVt/m9Jgdu4Tmn/
+WggPOeSD+nyRb7cXG5avJxyKoVNw3PbXnLJff0tcWeUvMpRv8XkbAAMFB/4vCqpr
+wIatF+w4AnGKbrcId+3LmZRzmtRKdOyUZgQg4JHUF5Bq7I9ls8OwMP0xnVlpJp9q
+cW/AUbouXH3GRTu3Or68ouhaSbi7nF/e+fnlWOdJ3VpD15CdRxeIvhycEahNs5Yj
+f0RzLOCyXMF0L74w+NxBNwDunolRWw/qgAHcVBaDni25SjQRzxuwzxvcS/jYua5B
+Pk10ocbAexdM+2XSSWThtCTg5qMeyLLUExqGlPbuNaMmUyIlz4hYnSaCGQoe33bq
+z/KZ91/keR1DVzK+zPm2vJUjcXHvxd5Jh9C+67CqnYfXf2lcYSSDSfop1Q5611la
+F7vRgY0/DXKNYlPUiEwEGBECAAwFAkeslPwFCQ0wWN8ACgkQjHGNO1By4fWlzgCf
+Qj3rkfcljYZOuLOn50J7PFuF7FoAnjwWGhwVi9+Fm2B5RZvpo++BBkdP
+=Xquv
+-----END PGP PUBLIC KEY BLOCK-----
+
+</programlisting>
+
+        <para>
+          To import the build key into your personal public GPG keyring,
+          use <command>gpg --import</command>. For example, if you have
+          saved the key in a file named
+          <filename>mysql_pubkey.asc</filename>, the import command
+          looks like this:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>gpg --import mysql_pubkey.asc</userinput>
+gpg: key 5072E1F5: public key "MySQL Package signing key (www.mysql.com) &lt;build@stripped&gt;" imported
+gpg: Total number processed: 1
+gpg:               imported: 1
+gpg: no ultimately trusted keys found
+</programlisting>
+
+        <para>
+          You can also download the key from the public keyserver using
+          the public key id, <literal>5072E1F5</literal>:
+        </para>
+
+<programlisting>shell&gt; gpg --recv-keys 5072E1F5
+gpg: requesting key 5072E1F5 from hkp server subkeys.pgp.net
+gpg: key 5072E1F5: "MySQL Package signing key (www.mysql.com) &lt;build@stripped&gt;" 2 new signatures
+gpg: no ultimately trusted keys found
+gpg: Total number processed: 1
+gpg:         new signatures: 2
+</programlisting>
+
+        <para>
+          If you want to import the key into your RPM configuration to
+          validate RPM install packages, you should be able to import
+          the key directly:
+        </para>
+
+<programlisting>shell&gt; <userinput>rpm --import mysql_pubkey.asc</userinput></programlisting>
+
+        <para>
+          If you experience problems, try exporting the key from
+          <command>gpg</command> and importing:
+        </para>
+
+<programlisting>shell&gt; gpg --export -a 5072e1f5 > 5072e1f5.asc
+shell&gt; rpm --import 5072e1f5.asc</programlisting>
+
+        <para>
+          Alternatively, <command>rpm</command> also supports loading
+          the key directly from a URL, and you cas use this manual page:
+        </para>
+
+<programlisting>shell&gt; <userinput>rpm --import &base-url-refman;/&current-series;/en/checking-gpg-signature.html</userinput></programlisting>
+
+        <para>
+          After you have downloaded and imported the public build key,
+          download your desired MySQL package and the corresponding
+          signature, which also is available from the download page. The
+          signature file has the same name as the distribution file with
+          an <filename>.asc</filename> extension, as shown by the
+          examples in the following table.
+        </para>
+
+        <informaltable>
+          <tgroup cols="2">
+            <colspec colwidth="25*"/>
+            <colspec colwidth="75*"/>
+            <tbody>
+              <row>
+                <entry>Distribution file</entry>
+                <entry><literal>mysql-standard-&current-version;-linux-i686.tar.gz</literal></entry>
+              </row>
+              <row>
+                <entry>Signature file</entry>
+                <entry><literal>mysql-standard-&current-version;-linux-i686.tar.gz.asc</literal></entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable>
+
+        <para>
+          Make sure that both files are stored in the same directory and
+          then run the following command to verify the signature for the
+          distribution file:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>gpg --verify <replaceable>package_name</replaceable>.asc</userinput>
+</programlisting>
+
+        <para>
+          Example:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>gpg --verify mysql-standard-&current-version;-linux-i686.tar.gz.asc</userinput>
+gpg: Signature made Tue 12 Jul 2005 23:35:41 EST using DSA key ID 5072E1F5
+gpg: Good signature from "MySQL Package signing key (www.mysql.com) &lt;build@stripped&gt;"
+</programlisting>
+
+        <para>
+          The <literal>Good signature</literal> message indicates that
+          everything is all right. You can ignore any <literal>insecure
+          memory</literal> warning you might obtain.
+        </para>
+
+        <para>
+          See the GPG documentation for more information on how to work
+          with public keys.
+        </para>
+
+      </section>
+
+      <section id="checking-rpm-signature">
+
+        <title>Signature Checking Using <literal>RPM</literal></title>
+
+        <para>
+          For RPM packages, there is no separate signature. RPM packages
+          have a built-in GPG signature and MD5 checksum. You can verify
+          a package by running the following command:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>rpm --checksig <replaceable>package_name</replaceable>.rpm</userinput>
+</programlisting>
+
+        <para>
+          Example:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>rpm --checksig MySQL-server-&current-version;-0.glibc23.i386.rpm</userinput>
+MySQL-server-&current-version;-0.glibc23.i386.rpm: md5 gpg OK
+</programlisting>
+
+        <note>
+          <para>
+            If you are using RPM 4.1 and it complains about
+            <literal>(GPG) NOT OK (MISSING KEYS:
+            GPG#5072e1f5)</literal>, even though you have imported the
+            MySQL public build key into your own GPG keyring, you need
+            to import the key into the RPM keyring first. RPM 4.1 no
+            longer uses your personal GPG keyring (or GPG itself).
+            Rather, it maintains its own keyring because it is a
+            system-wide application and a user's GPG public keyring is a
+            user-specific file. To import the MySQL public key into the
+            RPM keyring, first obtain the key as described in
+            <xref linkend="checking-gpg-signature"/>. Then use
+            <command>rpm --import</command> to import the key. For
+            example, if you have saved the public key in a file named
+            <filename>mysql_pubkey.asc</filename>, import it using this
+            command:
+          </para>
+        </note>
+
+<programlisting>
+shell&gt; <userinput>rpm --import mysql_pubkey.asc</userinput>
+</programlisting>
+
+        <para>
+          If you need to obtain the MySQL public key, see
+          <xref linkend="checking-gpg-signature"/>.
+        </para>
+
+      </section>
+
+    </section>
+
+    <section id="installation-layouts">
+
+      <title>Installation Layouts</title>
+
+      <indexterm>
+        <primary>installation layouts</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>layout of installation</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>directory structure</primary>
+        <secondary>default</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>default installation location</primary>
+      </indexterm>
+
+      <para>
+        This section describes the default layout of the directories
+        created by installing binary or source distributions provided by
+        Sun Microsystems, Inc. A distribution provided by another vendor
+        might use a layout different from those shown here.
+      </para>
+
+      <para>
+        For MySQL &current-series; on Windows, the default installation
+        directory is <filename>C:\Program Files\MySQL\MySQL Server
+        &current-series;</filename>. (Some Windows users prefer to
+        install in <filename>C:\mysql</filename>, the directory that
+        formerly was used as the default. However, the layout of the
+        subdirectories remains the same.) The installation directory has
+        the following subdirectories.
+      </para>
+
+      <informaltable>
+        <tgroup cols="2">
+          <colspec colwidth="35*"/>
+          <colspec colwidth="65*"/>
+          <tbody>
+            <row>
+              <entry><emphasis role="bold">Directory</emphasis></entry>
+              <entry><emphasis role="bold">Contents of Directory</emphasis></entry>
+            </row>
+            <row>
+              <entry><filename>bin</filename></entry>
+              <entry>Client programs and the <command>mysqld</command> server</entry>
+            </row>
+            <row>
+              <entry><filename>data</filename></entry>
+              <entry>Log files, databases</entry>
+            </row>
+            <row>
+              <entry><filename>Docs</filename></entry>
+              <entry>Manual in CHM format</entry>
+            </row>
+            <row>
+              <entry><filename>examples</filename></entry>
+              <entry>Example programs and scripts</entry>
+            </row>
+            <row>
+              <entry><filename>include</filename></entry>
+              <entry>Include (header) files</entry>
+            </row>
+            <row>
+              <entry><filename>lib</filename></entry>
+              <entry>Libraries</entry>
+            </row>
+            <row>
+              <entry><filename>scripts</filename></entry>
+              <entry>Utility scripts</entry>
+            </row>
+            <row>
+              <entry><filename>share</filename></entry>
+              <entry>Error message files</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+
+      <para>
+        Installations created from our Linux RPM distributions result in
+        files under the following system directories.
+      </para>
+
+      <informaltable>
+        <tgroup cols="2">
+          <colspec colwidth="35*"/>
+          <colspec colwidth="65*"/>
+          <tbody>
+            <row>
+              <entry><emphasis role="bold">Directory</emphasis></entry>
+              <entry><emphasis role="bold">Contents of Directory</emphasis></entry>
+            </row>
+            <row>
+              <entry><filename>/usr/bin</filename></entry>
+              <entry>Client programs and scripts</entry>
+            </row>
+            <row>
+              <entry><filename>/usr/sbin</filename></entry>
+              <entry>The <command>mysqld</command> server</entry>
+            </row>
+            <row>
+              <entry><filename>/var/lib/mysql</filename></entry>
+              <entry>Log files, databases</entry>
+            </row>
+            <row>
+              <entry><filename>/usr/share/info</filename></entry>
+              <entry>Manual in Info format</entry>
+            </row>
+            <row>
+              <entry><filename>/usr/share/man</filename></entry>
+              <entry>Unix manual pages</entry>
+            </row>
+            <row>
+              <entry><filename>/usr/include/mysql</filename></entry>
+              <entry>Include (header) files</entry>
+            </row>
+            <row>
+              <entry><filename>/usr/lib/mysql</filename></entry>
+              <entry>Libraries</entry>
+            </row>
+            <row>
+              <entry><filename>/usr/share/mysql</filename></entry>
+              <entry>Error message and character set files</entry>
+            </row>
+            <row>
+              <entry><filename>/usr/share/sql-bench</filename></entry>
+              <entry>Benchmarks</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+
+      <para>
+        On Unix, a <command>tar</command> file binary distribution is
+        installed by unpacking it at the installation location you
+        choose (typically <filename>/usr/local/mysql</filename>) and
+        creates the following directories in that location.
+      </para>
+
+      <informaltable>
+        <tgroup cols="2">
+          <colspec colwidth="35*"/>
+          <colspec colwidth="65*"/>
+          <tbody>
+            <row>
+              <entry><emphasis role="bold">Directory</emphasis></entry>
+              <entry><emphasis role="bold">Contents of Directory</emphasis></entry>
+            </row>
+            <row>
+              <entry><filename>bin</filename></entry>
+              <entry>Client programs and the <command>mysqld</command> server</entry>
+            </row>
+            <row>
+              <entry><filename>data</filename></entry>
+              <entry>Log files, databases</entry>
+            </row>
+            <row>
+              <entry><filename>docs</filename></entry>
+              <entry>Manual in Info format</entry>
+            </row>
+            <row>
+              <entry><filename>man</filename></entry>
+              <entry>Unix manual pages</entry>
+            </row>
+            <row>
+              <entry><filename>include</filename></entry>
+              <entry>Include (header) files</entry>
+            </row>
+            <row>
+              <entry><filename>lib</filename></entry>
+              <entry>Libraries</entry>
+            </row>
+            <row>
+              <entry><filename>scripts</filename></entry>
+              <entry><command>mysql_install_db</command></entry>
+            </row>
+            <row>
+              <entry><filename>share/mysql</filename></entry>
+              <entry>Error message files</entry>
+            </row>
+            <row>
+              <entry><filename>sql-bench</filename></entry>
+              <entry>Benchmarks</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+
+      <para>
+        A source distribution is installed after you configure and
+        compile it. By default, the installation step installs files
+        under <filename>/usr/local</filename>, in the following
+        subdirectories.
+      </para>
+
+      <informaltable>
+        <tgroup cols="2">
+          <colspec colwidth="35*"/>
+          <colspec colwidth="65*"/>
+          <tbody>
+            <row>
+              <entry><emphasis role="bold">Directory</emphasis></entry>
+              <entry><emphasis role="bold">Contents of Directory</emphasis></entry>
+            </row>
+            <row>
+              <entry><filename>bin</filename></entry>
+              <entry>Client programs and scripts</entry>
+            </row>
+            <row>
+              <entry><filename>include/mysql</filename></entry>
+              <entry>Include (header) files</entry>
+            </row>
+            <row>
+              <entry><filename>Docs</filename></entry>
+              <entry>Manual in Info, CHM formats</entry>
+            </row>
+            <row>
+              <entry><filename>man</filename></entry>
+              <entry>Unix manual pages</entry>
+            </row>
+            <row>
+              <entry><filename>lib/mysql</filename></entry>
+              <entry>Libraries</entry>
+            </row>
+            <row>
+              <entry><filename>libexec</filename></entry>
+              <entry>The <command>mysqld</command> server</entry>
+            </row>
+            <row>
+              <entry><filename>share/mysql</filename></entry>
+              <entry>Error message files</entry>
+            </row>
+            <row>
+              <entry><filename>sql-bench</filename></entry>
+              <entry>Benchmarks and <literal>crash-me</literal> test</entry>
+            </row>
+            <row>
+              <entry><filename>var</filename></entry>
+              <entry>Databases and log files</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+
+      <para>
+        Within its installation directory, the layout of a source
+        installation differs from that of a binary installation in the
+        following ways:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            The <command>mysqld</command> server is installed in the
+            <filename>libexec</filename> directory rather than in the
+            <filename>bin</filename> directory.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            The data directory is <filename>var</filename> rather than
+            <filename>data</filename>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <command>mysql_install_db</command> is installed in the
+            <filename>bin</filename> directory rather than in the
+            <filename>scripts</filename> directory.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            The header file and library directories are
+            <filename>include/mysql</filename> and
+            <filename>lib/mysql</filename> rather than
+            <filename>include</filename> and <filename>lib</filename>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        You can create your own binary installation from a compiled
+        source distribution by executing the
+        <filename>scripts/make_binary_distribution</filename> script
+        from the top directory of the source distribution.
+      </para>
+
+    </section>
+
+  </section>


Added: trunk/refman-5.1/installing-generic-binary.xml
===================================================================
--- trunk/refman-5.1/installing-generic-binary.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-generic-binary.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 455, Lines Deleted: 0; 16539 bytes

@@ -0,0 +1,455 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="installing-binary">
+
+    <title>Installing MySQL from Generic Binaries on Unix/Linux</title>
+
+    <indexterm>
+      <primary>installing</primary>
+      <secondary>binary distribution</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>binary distributions</primary>
+      <secondary>installing</secondary>
+    </indexterm>
+
+    <para>
+      This section covers the installation of MySQL binary distributions
+      that are provided for various platforms in the form of compressed
+      <command>tar</command> files (files with a
+      <filename>.tar.gz</filename> extension). See
+      <xref linkend="mysql-binaries"/>, for a detailed list.
+    </para>
+
+    <para>
+      To obtain MySQL, see <xref linkend="getting-mysql"/>.
+    </para>
+
+        <para>
+          Sun Microsystems, Inc. provides a set of binary distributions
+          of MySQL. In addition to binaries provided in
+          platform-specific package formats, we offer binary
+          distributions for a number of platforms in the form of
+          compressed <command>tar</command> files
+          (<filename>.tar.gz</filename> files). See
+          <xref linkend="quick-standard-installation"/>. For Windows
+          distributions, see <xref linkend="windows-installation"/>.
+        </para>
+
+        <para>
+          If you want to compile a debug version of MySQL from a source
+          distribution, you should add
+          <option role="configure">--with-debug</option> or
+          <option role="configure">--with-debug=full</option> to the
+          <command>configure</command> command used to configure the
+          distribution and remove any
+          <option>-fomit-frame-pointer</option> options.
+        </para>
+
+    <para>
+      MySQL <command>tar</command> file binary distributions have names
+      of the form
+      <filename>mysql-<replaceable>VERSION</replaceable>-<replaceable>OS</replaceable>.tar.gz</filename>,
+      where <literal><replaceable>VERSION</replaceable></literal> is a
+      number (for example, <literal>&current-version;</literal>), and
+      <replaceable>OS</replaceable> indicates the type of operating
+      system for which the distribution is intended (for example,
+      <literal>pc-linux-i686</literal>).
+    </para>
+
+    <para>
+      In addition to these generic packages, we also offer binaries in
+      platform-specific package formats for selected platforms. See
+      <xref linkend="quick-standard-installation"/>, for more
+      information on how to install these.
+    </para>
+
+    <para>
+      You need the following tools to install a MySQL
+      <command>tar</command> file binary distribution:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          GNU <literal>gunzip</literal> to uncompress the distribution.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A reasonable <command>tar</command> to unpack the
+          distribution. GNU <command>tar</command> is known to work.
+          Some operating systems come with a preinstalled version of
+          <command>tar</command> that is known to have problems. For
+          example, the <command>tar</command> provided with early
+          versions of Mac OS X, SunOS 4.x, Solaris 8, Solaris 9, Solaris
+          10 and OpenSolaris, and HP-UX are known to have problems with
+          long file names. On Mac OS X, you can use the preinstalled
+          <command>gnutar</command> program. On Solaris 10 and
+          OpenSolaris you can use the preinstalled
+          <command>gtar</command>. On other systems with a deficient
+          <command>tar</command>, you should install GNU
+          <command>tar</command> first.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
+      If you run into problems and need to file a bug report, please use
+      the instructions in <xref linkend="bug-reports"/>.
+    </para>
+
+    <indexterm>
+      <primary>commands</primary>
+      <secondary>for binary distribution</secondary>
+    </indexterm>
+
+    <para>
+      The basic commands that you must execute to install and use a
+      MySQL binary distribution are:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>groupadd mysql</userinput>
+shell&gt; <userinput>useradd -g mysql mysql</userinput>
+shell&gt; <userinput>cd /usr/local</userinput>
+shell&gt; <userinput>gunzip &lt; <replaceable>/path/to/mysql-VERSION-OS</replaceable>.tar.gz | tar xvf -</userinput>
+shell&gt; <userinput>ln -s <replaceable>full-path-to-mysql-VERSION-OS</replaceable> mysql</userinput>
+shell&gt; <userinput>cd mysql</userinput>
+shell&gt; <userinput>chown -R mysql .</userinput>
+shell&gt; <userinput>chgrp -R mysql .</userinput>
+shell&gt; <userinput>scripts/mysql_install_db --user=mysql</userinput>
+shell&gt; <userinput>chown -R root .</userinput>
+shell&gt; <userinput>chown -R mysql data</userinput>
+shell&gt; <userinput>bin/mysqld_safe --user=mysql &amp;</userinput>
+</programlisting>
+
+    <note>
+      <para>
+        This procedure does not set up any passwords for MySQL accounts.
+        After following the procedure, proceed to
+        <xref linkend="post-installation"/>.
+      </para>
+    </note>
+
+    <para>
+      A more detailed version of the preceding description for
+      installing a binary distribution follows:
+    </para>
+
+    <orderedlist>
+
+      <listitem>
+        <para>
+          Add a login user and group for <command>mysqld</command> to
+          run as:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>groupadd mysql</userinput>
+shell&gt; <userinput>useradd -g mysql mysql</userinput>
+</programlisting>
+
+        <para>
+          These commands add the <literal>mysql</literal> group and the
+          <literal>mysql</literal> user. The syntax for
+          <command>useradd</command> and <command>groupadd</command> may
+          differ slightly on different versions of Unix, or they may
+          have different names such as <command>adduser</command> and
+          <command>addgroup</command>.
+        </para>
+
+        <para>
+          You might want to call the user and group something else
+          instead of <literal>mysql</literal>. If so, substitute the
+          appropriate name in the following steps.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Pick the directory under which you want to unpack the
+          distribution and change location into it. In the following
+          example, we unpack the distribution under
+          <filename>/usr/local</filename>. (The instructions, therefore,
+          assume that you have permission to create files and
+          directories in <filename>/usr/local</filename>. If that
+          directory is protected, you must perform the installation as
+          <literal>root</literal>.)
+        </para>
+
+<programlisting>
+shell&gt; <userinput>cd /usr/local</userinput>
+</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          Obtain a distribution file using the instructions in
+          <xref linkend="getting-mysql"/>. For a given release, binary
+          distributions for all platforms are built from the same MySQL
+          source distribution.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Unpack the distribution, which creates the installation
+          directory. Then create a symbolic link to that directory:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>gunzip &lt; <replaceable>/path/to/mysql-VERSION-OS</replaceable>.tar.gz | tar xvf -</userinput>
+shell&gt; <userinput>ln -s <replaceable>full-path-to-mysql-VERSION-OS</replaceable> mysql</userinput>
+</programlisting>
+
+        <para>
+          The <command>tar</command> command creates a directory named
+          <filename>mysql-<replaceable>VERSION</replaceable>-<replaceable>OS</replaceable></filename>.
+          The <literal>ln</literal> command makes a symbolic link to
+          that directory. This lets you refer more easily to the
+          installation directory as
+          <filename>/usr/local/mysql</filename>.
+        </para>
+
+        <para>
+          With GNU <command>tar</command>, no separate invocation of
+          <literal>gunzip</literal> is necessary. You can replace the
+          first line with the following alternative command to
+          uncompress and extract the distribution:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>tar zxvf <replaceable>/path/to/mysql-VERSION-OS</replaceable>.tar.gz</userinput>
+</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          Change location into the installation directory:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>cd mysql</userinput>
+</programlisting>
+
+        <para>
+          You will find several files and subdirectories in the
+          <literal>mysql</literal> directory. The most important for
+          installation purposes are the <filename>bin</filename> and
+          <filename>scripts</filename> subdirectories:
+        </para>
+
+        <itemizedlist>
+
+          <indexterm>
+            <primary>PATH environment variable</primary>
+          </indexterm>
+
+          <indexterm>
+            <primary>environment variable</primary>
+            <secondary>PATH</secondary>
+          </indexterm>
+
+          <listitem>
+            <para>
+              The <filename>bin</filename> directory contains client
+              programs and the server. You should add the full path name
+              of this directory to your <literal>PATH</literal>
+              environment variable so that your shell finds the MySQL
+              programs properly. See
+              <xref linkend="environment-variables"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The <filename>scripts</filename> directory contains the
+              <command>mysql_install_db</command> script used to
+              initialize the <literal>mysql</literal> database
+              containing the grant tables that store the server access
+              permissions.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+      </listitem>
+
+      <listitem>
+        <para>
+          Ensure that the distribution contents are accessible to
+          <literal>mysql</literal>. If you unpacked the distribution as
+          <literal>mysql</literal>, no further action is required. If
+          you unpacked the distribution as <literal>root</literal>, its
+          contents will be owned by <literal>root</literal>. Change its
+          ownership to <literal>mysql</literal> by executing the
+          following commands as <literal>root</literal> in the
+          installation directory:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>chown -R mysql .</userinput>
+shell&gt; <userinput>chgrp -R mysql .</userinput>
+</programlisting>
+
+        <para>
+          The first command changes the owner attribute of the files to
+          the <literal>mysql</literal> user. The second changes the
+          group attribute to the <literal>mysql</literal> group.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          If you have not installed MySQL before, you must create the
+          MySQL data directory and initialize the grant tables:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>scripts/mysql_install_db --user=mysql</userinput>
+</programlisting>
+
+        <para>
+          If you run the command as <literal>root</literal>, include the
+          <option>--user</option> option as shown. If you run the
+          command while logged in as that user, you can omit the
+          <option>--user</option> option.
+        </para>
+
+        <para>
+          The command should create the data directory and its contents
+          with <literal>mysql</literal> as the owner.
+        </para>
+
+        <para>
+          After creating or updating the grant tables, you need to
+          restart the server manually.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Most of the MySQL installation can be owned by
+          <literal>root</literal> if you like. The exception is that the
+          data directory must be owned by <literal>mysql</literal>. To
+          accomplish this, run the following commands as
+          <literal>root</literal> in the installation directory:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>chown -R root .</userinput>
+shell&gt; <userinput>chown -R mysql data</userinput>
+</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          If you want MySQL to start automatically when you boot your
+          machine, you can copy
+          <literal>support-files/mysql.server</literal> to the location
+          where your system has its startup files. More information can
+          be found in the <literal>support-files/mysql.server</literal>
+          script itself and in <xref linkend="automatic-start"/>.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <indexterm>
+            <primary>adding</primary>
+            <secondary>new users</secondary>
+          </indexterm>
+
+          <indexterm>
+            <primary>new users</primary>
+            <secondary>adding</secondary>
+          </indexterm>
+
+          <indexterm>
+            <primary>users</primary>
+            <secondary>adding</secondary>
+          </indexterm>
+
+          You can set up new accounts using the
+          <command>bin/mysql_setpermission</command> script if you
+          install the <literal>DBI</literal> and
+          <literal>DBD::mysql</literal> Perl modules. See
+          <xref linkend="mysql-setpermission"/>. For Perl module
+          installation instructions, see <xref linkend="perl-support"/>.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          If you would like to use <command>mysqlaccess</command> and
+          have the MySQL distribution in some nonstandard location, you
+          must change the location where <command>mysqlaccess</command>
+          expects to find the <command>mysql</command> client. Edit the
+          <filename>bin/mysqlaccess</filename> script at approximately
+          line 18. Search for a line that looks like this:
+        </para>
+
+<programlisting>
+$MYSQL     = '/usr/local/bin/mysql';    # path to mysql executable
+</programlisting>
+
+        <para>
+          Change the path to reflect the location where
+          <command>mysql</command> actually is stored on your system. If
+          you do not do this, a <literal>Broken pipe</literal> error
+          will occur when you run <command>mysqlaccess</command>.
+        </para>
+      </listitem>
+
+    </orderedlist>
+
+    <para>
+      After everything has been unpacked and installed, you should test
+      your distribution. To start the MySQL server, use the following
+      command:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysqld_safe --user=mysql &amp;</userinput>
+</programlisting>
+
+    <para>
+      If you run the command as <literal>root</literal>, you must use
+      the <option>--user</option> option as shown. The value of the
+      option is the name of the login account that you created in the
+      first step to use for running the server. If you run the command
+      while logged in as <literal>mysql</literal>, you can omit the
+      <option>--user</option> option.
+    </para>
+
+    <para>
+      If the command fails immediately and prints <literal>mysqld
+      ended</literal>, you can find some information in the
+      <filename><replaceable>host_name</replaceable>.err</filename> file
+      in the data directory.
+    </para>
+
+    <para>
+      More information about <command>mysqld_safe</command> is given in
+      <xref linkend="mysqld-safe"/>.
+    </para>
+
+    <note>
+      <para>
+        The accounts that are listed in the MySQL grant tables initially
+        have no passwords. After starting the server, you should set up
+        passwords for them using the instructions in
+        <xref linkend="post-installation"/>.
+      </para>
+    </note>
+
+  </section>


Added: trunk/refman-5.1/installing-hpux.xml
===================================================================
--- trunk/refman-5.1/installing-hpux.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-hpux.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 150, Lines Deleted: 0; 5303 bytes

@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="mysql-installation-hpux">
+
+        <title>Installing MySQL on HP-UX</title>
+
+        <para>
+          If you install MySQL using a binary tarball distribution on
+          HP-UX, you may run into trouble even before you get the MySQL
+          distribution unpacked, as the HP-UX <command>tar</command>
+          cannot handle long file names. This means that you may see
+          errors when you try to unpack MySQL.
+        </para>
+
+        <para>
+          If this occurs, you must use GNU <command>tar</command>
+          (<command>gtar</command>) to unpack the distribution.
+        </para>
+
+        <para>
+          Because of some critical bugs in the standard HP-UX libraries,
+          you should install the following patches before trying to run
+          MySQL on HP-UX 11.0:
+        </para>
+
+<programlisting>
+PHKL_22840 Streams cumulative
+PHNE_22397 ARPA cumulative
+</programlisting>
+
+        <para>
+          This solves the problem of getting
+          <literal>EWOULDBLOCK</literal> from <literal>recv()</literal>
+          and <literal>EBADF</literal> from <literal>accept()</literal>
+          in threaded applications.
+        </para>
+
+        <para>
+          If you are using <command>gcc</command> 2.95.1 on an unpatched
+          HP-UX 11.x system, you may get the following error:
+        </para>
+
+<programlisting>
+In file included from /usr/include/unistd.h:11,
+                 from ../include/global.h:125,
+                 from mysql_priv.h:15,
+                 from item.cc:19:
+/usr/include/sys/unistd.h:184: declaration of C function ...
+/usr/include/sys/pthread.h:440: previous declaration ...
+In file included from item.h:306,
+                 from mysql_priv.h:158,
+                 from item.cc:19:
+</programlisting>
+
+        <para>
+          The problem is that HP-UX does not define
+          <literal>pthreads_atfork()</literal> consistently. It has
+          conflicting prototypes in
+          <filename>/usr/include/sys/unistd.h</filename>:184 and
+          <filename>/usr/include/sys/pthread.h</filename>:440.
+        </para>
+
+        <para>
+          One solution is to copy
+          <filename>/usr/include/sys/unistd.h</filename> into
+          <filename>mysql/include</filename> and edit
+          <filename>unistd.h</filename> and change it to match the
+          definition in <filename>pthread.h</filename>. Look for this
+          line:
+        </para>
+
+<programlisting>
+extern int pthread_atfork(void (*prepare)(), void (*parent)(),
+                                          void (*child)());
+</programlisting>
+
+        <para>
+          Change it to look like this:
+        </para>
+
+<programlisting>
+extern int pthread_atfork(void (*prepare)(void), void (*parent)(void),
+                                          void (*child)(void));
+</programlisting>
+
+        <para>
+          After making the change, the following
+          <command>configure</command> line should work:
+        </para>
+
+<programlisting>
+CFLAGS="-fomit-frame-pointer -O3 -fpic" CXX=gcc \
+CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti -O3" \
+./configure --prefix=/usr/local/mysql --disable-shared
+</programlisting>
+
+        <para>
+          If you are using HP-UX compiler, you can use the following
+          command (which has been tested with <command>cc</command>
+          B.11.11.04):
+        </para>
+
+<programlisting>
+CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64 ./configure \
+    --with-extra-character-set=complex
+</programlisting>
+
+        <para>
+          You can ignore any errors of the following type:
+        </para>
+
+<programlisting>
+aCC: warning 901: unknown option: `-3': use +help for online
+documentation
+</programlisting>
+
+        <para>
+          If you get the following error from
+          <command>configure</command>, verify that you don't have the
+          path to the K&amp;R compiler before the path to the HP-UX C
+          and C++ compiler:
+        </para>
+
+<programlisting>
+checking for cc option to accept ANSI C... no
+configure: error: MySQL requires an ANSI C compiler (and a C++ compiler).
+Try gcc. See the Installation chapter in the Reference Manual.
+</programlisting>
+
+        <para>
+          Another reason for not being able to compile is that you
+          didn't define the <literal>+DD64</literal> flags as just
+          described.
+        </para>
+
+        <para>
+          Another possibility for HP-UX 11 is to use the MySQL binaries
+          provided at <ulink url="&base-url-downloads;"/>, which we have
+          built and tested ourselves. We have also received reports that
+          the HP-UX 10.20 binaries supplied by MySQL can be run
+          successfully on HP-UX 11. If you encounter problems, you
+          should be sure to check your HP-UX patch level.
+        </para>
+
+      </section>


Added: trunk/refman-5.1/installing-i5os.xml
===================================================================
--- trunk/refman-5.1/installing-i5os.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-i5os.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 387, Lines Deleted: 0; 13891 bytes

@@ -0,0 +1,387 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+
+  <section id="installation-i5os">
+
+    <title>Installing MySQL on i5/OS</title>
+
+    <indexterm>
+      <primary>IBM i5/OS</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>i5/OS</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>AS/400</primary>
+    </indexterm>
+
+    <para>
+      The i5/OS POWER MySQL package was created in cooperation with IBM.
+      MySQL works within the Portable Application Solution Environment
+      (PASE) on the System i series of hardware and will also provide
+      database services for the Zend Core for i5/OS.
+    </para>
+
+    <para>
+      MySQL for i5/OS is provided both as a <literal>tar</literal> file and as a save file
+      (<literal>.savf</literal>) package that can be downloaded and
+      installed directly without any additional installation steps
+      required. To install MySQL using the <literal>tar</literal> file, see <xref linkend="installing-binary"/>.
+    </para>
+
+    <para>
+      MySQL is only supported on i5/OS V5R4 or later releases. The i5/OS
+      PASE must be installed for MySQL to operate. You must be able to
+      login as a user in <literal>*SECOFR</literal> class.
+    </para>
+
+    <para>
+      You should the installation notes and tips for i5/OS before
+      starting installation. See
+      <link linkend="installation-i5os-notes">i5/OS Installation
+      Notes</link>.
+    </para>
+
+<para><emphasis role="bold">Before Installation:</emphasis></para>
+
+    <note>
+      <para>
+        The installation package will use an existing configuration if
+        you have previously installed MySQL (which is identified by
+        looking for the file <filename>/etc/my.cnf</filename>). The
+        values for the data directory (<literal>DATADIR</literal>) and
+        owner of the MySQL files (<literal>USRPRF</literal>) specified
+        during the installation will be ignored, and the values
+        determined from the <filename>/etc/my.cnf</filename> will be
+        used instead.
+      </para>
+
+      <para>
+        If you want to change these parameters during a new install, you
+        should temporarily rename <filename>/etc/my.cnf</filename>,
+        install MySQL using the new parameters you want to use, and then
+        merge your previous <filename>/etc/my.cnf</filename>
+        configuration settings with the new
+        <filename>/etc/my.cnf</filename> file that is created during
+        installation.
+      </para>
+    </note>
+
+<itemizedlist>
+      <listitem>
+        <para> You must have a user profile with PASE with suitable privileges. The user should be within the 
+          <literal>*SECOFR</literal> class, such as the
+          <literal>QSECOFR</literal> user ID. You can use the <literal>WRKUSRPRF</literal> command to check your user profile. 
+        </para>
+      </listitem>
+  
+  <listitem><para>For network connections to MySQL, you must have TCP/IP enabled. You should also check the following:</para>
+  <itemizedlist>
+    <listitem><para>Ensure that a name has defined for the system. Run the Configure TCP/IP (<literal>CFGTCP</literal>) 
+command and select option 12 (Change TCP/IP domain information) to display this 
+setting. Make sure that a value is listed in the Host name field.  </para></listitem>
+    
+    <listitem><para>Make sure that the system has a loopback entry which represents the <literal>localhost</literal> or <literal>127.0.0.1</literal>.</para></listitem>
+    
+    <listitem><para>Ensure that the IP address of the IBM i machine is mapped correctly to the host name. </para></listitem>
+  </itemizedlist>
+  </listitem>
+
+</itemizedlist>
+    
+    
+    <para>
+      To install MySQL on i5/OS, follow these steps:
+    </para>
+
+    <orderedlist>
+
+      <listitem>
+        <para>
+          On the System i machine, create a save file that will be used
+          to receive the downloaded installation save file. The file
+          should be located within the General Purpose Library
+          (<filename>QGPL</filename>):
+        </para>
+
+<programlisting>CRTSAVF FILE(QGPL/MYSQLINST)</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          Download the MySQL installation save file in 32-bit
+          (<filename>mysql-<replaceable>5.0.42</replaceable>-i5os-power-32bit.savf</filename>)
+          or 64-bit
+          (<filename>mysql-<replaceable>5.0.42</replaceable>-i5os-power-64bit.savf</filename>)
+          from <ulink url="http://dev.mysql.com/downloads">MySQL
+          Downloads</ulink>.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          You need to FTP the downloaded <literal>.savf</literal> file
+          directly into the <literal>QGPL/MYSQLINST</literal> file on
+          the System i server. You can do this through FTP using the
+          following steps after logging in to the System i machine:
+        </para>
+
+<programlisting>ftp&gt; bin
+ftp&gt; cd qgpl
+ftp&gt; put mysql-<replaceable>5.0.42</replaceable>-i5os-power.savf mysqlinst</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          Log into the System i server using a user in the
+          <literal>*SECOFR</literal> class, such as the
+          <literal>QSECOFR</literal> user ID.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          You need to restore the installation library stored in the
+          <filename>.savf</filename> save file:
+        </para>
+
+<programlisting>RSTLIB MYSQLINST DEV(*SAVF) SAVF(QGPL/MYSQLINST)</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          You need to execute the installation command,
+          <filename>MYSQLINST/INSMYSQL</filename>. You can specify three
+          parameter settings during installation:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <literal>DIR(<replaceable>'/opt/mysql'</replaceable>)</literal>
+              sets the installation location for the MySQL files. The
+              directory will be created if it does not already exist.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <literal>DATADIR(<replaceable>'/QOpenSys/mysal/data'</replaceable>)</literal>
+              sets the location of the directory that will be used to
+              store the database files and binary logs. The default
+              setting is <filename>/QOpenSys/mysql/data</filename>. Note
+              that if the installer detects an existing installation
+              (due to the existence of
+              <filename>/etc/my.cnf</filename>), then this parameter
+              will be ignored.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <literal>USRPRF(<replaceable>MYSQL</replaceable>)</literal>
+              sets the user profile that will own the files that are
+              installed. The profile will be created if it does not
+              already exist.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          MySQL can be installed anywhere, for this example we will
+          assume MySQL has been installed into
+          <filename>/opt/mysql</filename>. The <literal>MYSQL</literal>
+          user profile that was created earlier in this sequence should
+          be used for the profile:
+        </para>
+
+<programlisting>MYSQLINST/INSMYSQL DIR('/opt/mysql') DATADIR('/opt/mysqldata') USRPRF(MYSQL)</programlisting>
+
+        <para>
+          If you are updating an installation over an existing MySQL
+          installation, you should use the same parameter values that
+          were used when MySQL was originally installed.
+        </para>
+
+        <para>
+          The installation copies all the necessary files into a
+          directory matching the package version (for example
+          <filename>mysql-5.0.42-i5os-power-32bit</filename>), sets the
+          ownership on those files, sets up the MySQL environment and
+          creates the MySQL configuration file (in
+          <filename>/etc/my.cnf</filename>) completing all the steps in
+          a typical binary installation process automatically. If this
+          is a new installation of MySQL, or if the installer detects
+          that this is a new version (because the
+          <filename>/etc/my.cnf</filename> file does not exist), then
+          the initial core MySQL databases will also be created during
+          installation.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Once the installation has completed, you can delete the
+          installation file:
+        </para>
+
+<programlisting>DLTLIB LIB(MYSQLINST)</programlisting>
+      </listitem>
+
+    </orderedlist>
+
+    <para>
+      To start MySQL:
+    </para>
+
+    <orderedlist>
+
+      <listitem>
+        <para>
+          Log into the System i server using a user within the
+          <literal>*SECOFR</literal> class, such as the
+          <literal>QSECOFR</literal> user ID.
+        </para>
+
+        <note>
+          <para>
+            You should start <command>mysqld_safe</command> using a user
+            that in the PASE environment has the id=0 (the equivalent of
+            the standard Unix <literal>root</literal> user). If you do
+            not use a user with this ID then the system will be unable
+            to change the user when executing <command>mysqld</command>
+            as set using <literal>--user</literal> option. If this
+            happens, <command>mysqld</command> may be unable to read the
+            files located within the MySQL data directory and the
+            execution will fail.
+          </para>
+        </note>
+      </listitem>
+
+      <listitem>
+        <para>
+          Enter the PASE environment using <literal>call
+          qp2term</literal>.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Start the MySQL server by changing to the installation
+          directory and running <command>mysqld_safe</command>,
+          specifying the user name used to install the server. The
+          installer conveniently installs a symbolic link to the
+          installation directory
+          (<filename>mysql-5.0.42-i5os-power-32bit</filename>) as
+          <filename>/opt/mysql/mysql</filename>:
+        </para>
+
+<programlisting>&gt; cd /opt/mysql/mysql
+&gt; bin/mysqld_safe --user=mysql &amp;</programlisting>
+
+        <para>
+          You should see a message similar to the following:
+        </para>
+
+<programlisting>Starting mysqld daemon with databases &raquo;
+     from /opt/mysql/mysql-enterprise-5.0.42-i5os-power-32bit/data</programlisting>
+      </listitem>
+
+    </orderedlist>
+
+    <para>
+      If you are having problems starting MySQL server, see
+      <xref linkend="starting-server"/>.
+    </para>
+
+    <para>
+      To stop MySQL:
+    </para>
+
+    <orderedlist>
+
+      <listitem>
+        <para>
+          Log into the System i server using the
+          <literal>*SECOFR</literal> class, such as the
+          <literal>QSECOFR</literal> user ID.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Enter the PASE environment using <literal>call
+          qp2term</literal>.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Stop the MySQL server by changing into the installation
+          directory and running <command>mysqladmin</command>,
+          specifying the user name used to install the server:
+        </para>
+
+<programlisting>&gt; cd /opt/mysql/mysql
+&gt; bin/mysqladmin -u root shutdown</programlisting>
+
+        <para>
+          If the session that you started and stopped MySQL are the
+          same, you may get the log output from
+          <literal>mysqld</literal>:
+        </para>
+
+<programlisting>   STOPPING server from pid file &raquo;
+     /opt/mysql/mysql-enterprise-5.0.42-i5os-power-32bit/data/I5DBX.RCHLAND.IBM.COM.pid
+   070718 10:34:20  mysqld ended</programlisting>
+
+        <para>
+          If the sessions used to start and stop MySQL are different,
+          you will not receive any confirmation of the shutdown.
+        </para>
+      </listitem>
+
+    </orderedlist>
+
+    <para id="installation-i5os-notes">
+      <emphasis>Note and tips</emphasis>
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          A problem has been identified with the installation process on
+          DBCS systems. If you are having problems install MySQL on a
+          DBCS system, you need to change your job's coded character set
+          identifier (<literal>CSSID</literal>) to 37
+          (<literal>EBCDIC</literal>) before executing the install
+          command, <literal>INSMYSQL</literal>. To do this, determine
+          your existing <literal>CSSID</literal> (using
+          <literal>DSPJOB</literal> and selecting option 2), execute
+          <literal>CHGJOB CSSID(37)</literal>, run
+          <literal>INSMYSQL</literal> to install MySQL and then execute
+          <literal>CHGJOB</literal> again with your original
+          <literal>CSSID.</literal>
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          If you want to use the Perl scripts that are included with
+          MySQL, you need to download the iSeries Tools for Developers
+          (5799-PTL). See
+          <ulink url="http://www-03.ibm.com/servers/enable/site/porting/tools/"/>.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+  </section>


Added: trunk/refman-5.1/installing-linux.xml
===================================================================
--- trunk/refman-5.1/installing-linux.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-linux.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 485, Lines Deleted: 0; 17640 bytes

@@ -0,0 +1,485 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+
+<section id="linux">
+  
+  <title>Installing MySQL on Linux</title>
+
+  <para>The following sections covers the installation of Linux using RPMs. For information on using a generic binary package using <literal>tar</literal>, see <xref linkend="installing-binary"/>. For information on installing from source, see <xref linkend="installing-source"/>.</para>
+
+        <para>
+          <command>mysql.server</command> can be found in the
+          <filename>support-files</filename> directory under the MySQL
+          installation directory or in a MySQL source tree. You can
+          install it as <filename>/etc/init.d/mysql</filename> for
+          automatic MySQL startup and shutdown. See
+          <xref linkend="automatic-start"/>.
+        </para>
+
+  <section id="linux-rpm">
+
+    <title>Installing MySQL from RPM Packages on Linux</title>
+
+    <indexterm>
+      <primary>RPM file</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>RPM Package Manager</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>installing</primary>
+      <secondary>Linux RPM packages</secondary>
+    </indexterm>
+
+    <para>
+      The recommended way to install MySQL on RPM-based Linux
+      distributions is by using the RPM packages. The RPMs that we
+      provide to the community should work on all versions of Linux that
+      support RPM packages and use <literal>glibc</literal> 2.3. To
+      obtain RPM packages, see <xref linkend="getting-mysql"/>.
+    </para>
+
+    <para>
+      For non-RPM Linux distributions, you can install MySQL using a
+      <filename>.tar.gz</filename> package. See
+      <xref linkend="installing-binary"/>.
+    </para>
+
+    <para>
+      We do provide some platform-specific RPMs; the difference between
+      a platform-specific RPM and a generic RPM is that a
+      platform-specific RPM is built on the targeted platform and is
+      linked dynamically whereas a generic RPM is linked statically with
+      LinuxThreads.
+    </para>
+
+    <note>
+      <para>
+        RPM distributions of MySQL often are provided by other vendors.
+        Be aware that they may differ in features and capabilities from
+        those built by us, and that the instructions in this manual do
+        not necessarily apply to installing them. The vendor's
+        instructions should be consulted instead.
+      </para>
+    </note>
+
+
+    <para>
+      In most cases, you need to install only the
+      <literal>MySQL-server</literal> and
+      <literal>MySQL-client</literal> packages to get a functional MySQL
+      installation. The other packages are not required for a standard
+      installation.
+    </para>
+
+    <formalpara>
+
+      <title>RPMs for MySQL Cluster</title>
+
+      <para>
+        Beginning with MySQL 5.1.24, standard MySQL server RPMs built by
+        MySQL no longer provide support for the
+        <literal role="se">NDBCLUSTER</literal> storage engine. MySQL
+        Cluster users wanting to upgrade MySQL 5.1.23 or earlier
+        installations from RPMs built by MySQL should upgrade to MySQL
+        Cluster NDB 6.2 or MySQL Cluster NDB 6.3; RPMs that should work
+        with most Linux distributions are available for both of these
+        release series.
+
+        <important>
+          <para>
+            When upgrading a MySQL Cluster RPM installation, you must
+            upgrade <emphasis>all</emphasis> installed RPMs, including
+            the <literal>Server</literal> and <literal>Client</literal>
+            RPMs.
+          </para>
+        </important>
+
+        For more information about installing MySQL Cluster from RPMs,
+        see <xref linkend="mysql-cluster-multi-install"/>.
+      </para>
+
+    </formalpara>
+
+    <para>
+      For upgrades, if your installation was originally produced by
+      installing multiple RPM packages, it is best to upgrade all the
+      packages, not just some. For example, if you previously installed
+      the server and client RPMs, do not upgrade just the server RPM.
+    </para>
+
+    <para>
+      The RPM packages shown in the following list are available. The
+      names shown here use a suffix of
+      <filename>.glibc23.i386.rpm</filename>, but particular packages
+      can have different suffixes, described later.
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          <literal>MySQL-server-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          The MySQL server. You need this unless you only want to
+          connect to a MySQL server running on another machine.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-client-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          The standard MySQL client programs. You probably always want
+          to install this package.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-devel-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          The libraries and include files that are needed if you want to
+          compile other MySQL clients, such as the Perl modules.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-debuginfo-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          This package contains debugging information.
+          <literal>debuginfo</literal> RPMs are never needed to use
+          MySQL software; this is true both for the server and for
+          client programs. However, they contain additional information
+          that might be needed by a debugger to analyze a crash.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-shared-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          This package contains the shared libraries
+          (<literal>libmysqlclient.so*</literal>) that certain languages
+          and applications need to dynamically load and use MySQL. It
+          contains single-threaded and thread-safe libraries. If you
+          install this package, do not install the
+          <literal>MySQL-shared-compat</literal> package.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-shared-compat-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          This package includes the shared libraries for MySQL 3.23,
+          4.0, and so on, up to the current release. It contains
+          single-threaded and thread-safe libraries. Install this
+          package instead of <literal>MySQL-shared</literal> if you have
+          applications installed that are dynamically linked against
+          older versions of MySQL but you want to upgrade to the current
+          version without breaking the library dependencies.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-shared-compat-advanced-gpl-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>,
+          <literal>MySQL-shared-compat-advanced-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          These are like the <literal>MySQL-shared-compat</literal>
+          package, but are for the <quote>MySQL Enterprise Server
+          &ndash; Advanced Edition</quote> products. Install these
+          packages rather than the normal
+          <literal>MySQL-shared-compat</literal> package if you want to
+          included shared client libraries for older MySQL versions.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-embedded-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          The embedded MySQL server library.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-ndb-management-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>,
+          <literal>MySQL-ndb-storage-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>,
+          <literal>MySQL-ndb-tools-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>,
+          <literal>MySQL-ndb-extra-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          Packages that contain additional files for MySQL Cluster
+          installations.
+        </para>
+
+        <note>
+          <para>
+            The <literal>MySQL-ndb-tools</literal> RPM requires a
+            working installation of perl. Prior to MySQL 5.1.18, the
+            <literal>DBI</literal> and <literal>HTML::Template</literal>
+            packages were also required. See
+            <xref linkend="perl-support"/>, and
+            <xref linkend="mysql-cluster-programs-ndb-size-pl"/>, for
+            more information.
+          </para>
+        </note>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-test-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</literal>
+        </para>
+
+        <para>
+          This package includes the MySQL test suite.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <literal>MySQL-<replaceable>VERSION</replaceable>.src.rpm</literal>
+        </para>
+
+        <para>
+          This contains the source code for all of the previous
+          packages. It can also be used to rebuild the RPMs on other
+          architectures (for example, Alpha or SPARC).
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
+      The suffix of RPM package names (following the
+      <replaceable>VERSION</replaceable> value) has the following
+      syntax:
+    </para>
+
+<programlisting>
+.<replaceable>PLATFORM</replaceable>.<replaceable>CPU</replaceable>.rpm
+</programlisting>
+
+    <para>
+      The <replaceable>PLATFORM</replaceable> and
+      <replaceable>CPU</replaceable> values indicate the type of system
+      for which the package is built.
+      <replaceable>PLATFORM</replaceable> indicates the platform and
+      <replaceable>CPU</replaceable> indicates the processor type or
+      family.
+    </para>
+
+    <para>
+      All packages are dynamically linked against
+      <literal>glibc</literal> 2.3. The
+      <replaceable>PLATFORM</replaceable> value indicates whether the
+      package is platform independent or intended for a specific
+      platform, as shown in the following table.
+    </para>
+
+    <informaltable>
+      <tgroup cols="2">
+        <colspec colwidth="25*"/>
+        <colspec colwidth="75*"/>
+        <tbody>
+          <row>
+            <entry><literal>glibc23</literal></entry>
+            <entry>Platform independent, should run on any Linux distribution that supports
+              <literal>glibc</literal> 2.3</entry>
+          </row>
+          <row>
+            <entry><literal>rhel3</literal>, <literal>rhel4</literal></entry>
+            <entry>Red Hat Enterprise Linux 3 or 4</entry>
+          </row>
+          <row>
+            <entry><literal>sles9</literal>, <literal>sles10</literal></entry>
+            <entry>SuSE Linux Enterprise Server 9 or 10</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para>
+      In MySQL &current-series;, only <literal>glibc23</literal>
+      packages are available currently.
+    </para>
+
+    <para>
+      The <replaceable>CPU</replaceable> value indicates the processor
+      type or family for which the package is built.
+    </para>
+
+    <informaltable>
+      <tgroup cols="2">
+        <colspec colwidth="25*"/>
+        <colspec colwidth="75*"/>
+        <tbody>
+          <row>
+            <entry><literal>i386</literal></entry>
+            <entry>x86 processor, 386 and up</entry>
+          </row>
+          <row>
+            <entry><literal>i586</literal></entry>
+            <entry>x86 processor, Pentium and up</entry>
+          </row>
+          <row>
+            <entry><literal>x86_64</literal></entry>
+            <entry>64-bit x86 processor</entry>
+          </row>
+          <row>
+            <entry><literal>ia64</literal></entry>
+            <entry>Itanium (IA-64) processor</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para>
+      To see all files in an RPM package (for example, a
+      <literal>MySQL-server</literal> RPM), run a command like this:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>rpm -qpl MySQL-server-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</userinput>
+</programlisting>
+
+    <para>
+      To perform a standard minimal installation, install the server and
+      client RPMs:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>rpm -i MySQL-server-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</userinput>
+shell&gt; <userinput>rpm -i MySQL-client-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</userinput>
+</programlisting>
+
+    <para>
+      To install only the client programs, install just the client RPM:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>rpm -i MySQL-client-<replaceable>VERSION</replaceable>.glibc23.i386.rpm</userinput>
+</programlisting>
+
+    <para>
+      RPM provides a feature to verify the integrity and authenticity of
+      packages before installing them. If you would like to learn more
+      about this feature, see
+      <xref linkend="verifying-package-integrity"/>.
+    </para>
+
+    <para>
+      The server RPM places data under the
+      <filename>/var/lib/mysql</filename> directory. The RPM also
+      creates a login account for a user named <literal>mysql</literal>
+      (if one does not exist) to use for running the MySQL server, and
+      creates the appropriate entries in
+      <filename>/etc/init.d/</filename> to start the server
+      automatically at boot time. (This means that if you have performed
+      a previous installation and have made changes to its startup
+      script, you may want to make a copy of the script so that you
+      don't lose it when you install a newer RPM.) See
+      <xref linkend="automatic-start"/>, for more information on how
+      MySQL can be started automatically on system startup.
+    </para>
+
+    <para>
+      If you want to install the MySQL RPM on older Linux distributions
+      that do not support initialization scripts in
+      <filename>/etc/init.d</filename> (directly or via a symlink), you
+      should create a symbolic link that points to the location where
+      your initialization scripts actually are installed. For example,
+      if that location is <filename>/etc/rc.d/init.d</filename>, use
+      these commands before installing the RPM to create
+      <filename>/etc/init.d</filename> as a symbolic link that points
+      there:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>cd /etc</userinput>
+shell&gt; <userinput>ln -s rc.d/init.d .</userinput>
+</programlisting>
+
+    <para>
+      However, all current major Linux distributions should support the
+      new directory layout that uses <filename>/etc/init.d</filename>,
+      because it is required for LSB (Linux Standard Base) compliance.
+    </para>
+
+    <para>
+      If the RPM files that you install include
+      <literal>MySQL-server</literal>, the <command>mysqld</command>
+      server should be up and running after installation. You should be
+      able to start using MySQL.
+    </para>
+
+    <para>
+      If something goes wrong, you can find more information in the
+      binary installation section. See
+      <xref linkend="installing-binary"/>.
+    </para>
+
+    <note>
+      <para>
+        The accounts that are listed in the MySQL grant tables initially
+        have no passwords. After starting the server, you should set up
+        passwords for them using the instructions in
+        <xref linkend="post-installation"/>.
+      </para>
+    </note>
+
+    <para>
+      During RPM installation, a user named <literal>mysql</literal> and
+      a group named <literal>mysql</literal> are created on the system.
+      This is done using the <command>useradd</command>,
+      <command>groupadd</command>, and <command>usermod</command>
+      commands. Those commands require appropriate administrative
+      privileges, which is ensured for locally managed users and groups
+      (as listed in the <filename>/etc/passwd</filename> and
+      <filename>/etc/group</filename> files) by the RPM installation
+      process being run by <literal>root</literal>.
+    </para>
+
+    <para>
+      For nonlocal user management (LDAP, NIS, and so forth), the
+      administrative tools may require additional authentication (such
+      as a password), and will fail if the installing user does not
+      provide this authentication. Even if they fail, the RPM
+      installation will not abort but succeed, and this is intentional.
+      If they failed, some of the intended transfer of ownership may be
+      missing, and it is recommended that the system administrator then
+      manually ensures some appropriate user andgroup exists and
+      manually transfers ownership following the actions in the RPM spec
+      file.
+    </para>
+
+  </section>
+</section>


Added: trunk/refman-5.1/installing-macosx.xml
===================================================================
--- trunk/refman-5.1/installing-macosx.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-macosx.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 284, Lines Deleted: 0; 10672 bytes

@@ -0,0 +1,284 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="mac-os-x">
+
+    <title>Installing MySQL on Mac OS X</title>
+
+    <indexterm>
+      <primary>Mac OS X</primary>
+      <secondary>installation</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>installing</primary>
+      <secondary>Mac OS X PKG packages</secondary>
+    </indexterm>
+
+    <para>
+      You can install MySQL on Mac OS X 10.3.x (<quote>Panther</quote>)
+      or newer using a Mac OS X binary package in PKG format instead of
+      the binary tarball distribution. Please note that older versions
+      of Mac OS X (for example, 10.1.x or 10.2.x) are
+      <emphasis role="bold">not</emphasis> supported by this package.
+    </para>
+
+    <para>
+      The package is located inside a disk image
+      (<literal>.dmg</literal>) file that you first need to mount by
+      double-clicking its icon in the Finder. It should then mount the
+      image and display its contents.
+    </para>
+
+    <para>
+      When installing from the package version, you should also install
+      the MySQL Preference Pane, which will allow you to control the
+      startup and execution of your MySQL server from System
+      Preferences.
+    </para>
+
+    <para>
+      To obtain MySQL, see <xref linkend="getting-mysql"/>.
+    </para>
+
+    <note>
+      <para>
+        Before proceeding with the installation, be sure to shut down
+        all running MySQL server instances by either using the MySQL
+        Manager Application (on Mac OS X Server) or via
+        <command>mysqladmin shutdown</command> on the command line.
+      </para>
+    </note>
+
+    <para>
+      To actually install the MySQL PKG file, double-click on the
+      package icon. This launches the Mac OS X Package Installer, which
+      guides you through the installation of MySQL.
+    </para>
+
+    <para>
+      Due to a bug in the Mac OS X package installer, you may see this
+      error message in the destination disk selection dialog:
+    </para>
+
+<programlisting>
+You cannot install this software on this disk. (null)
+</programlisting>
+
+    <para>
+      If this error occurs, simply click the <literal>Go Back</literal>
+      button once to return to the previous screen. Then click
+      <literal>Continue</literal> to advance to the destination disk
+      selection again, and you should be able to choose the destination
+      disk correctly. We have reported this bug to Apple and it is
+      investigating this problem.
+    </para>
+
+    <para>
+      The Mac OS X PKG of MySQL installs itself into
+      <filename>/usr/local/mysql-<replaceable>VERSION</replaceable></filename>
+      and also installs a symbolic link,
+      <filename>/usr/local/mysql</filename>, that points to the new
+      location. If a directory named
+      <filename>/usr/local/mysql</filename> exists, it is renamed to
+      <filename>/usr/local/mysql.bak</filename> first. Additionally, the
+      installer creates the grant tables in the <literal>mysql</literal>
+      database by executing <command>mysql_install_db</command>.
+    </para>
+
+    <para>
+      The installation layout is similar to that of a
+      <command>tar</command> file binary distribution; all MySQL
+      binaries are located in the directory
+      <filename>/usr/local/mysql/bin</filename>. The MySQL socket file
+      is created as <filename>/tmp/mysql.sock</filename> by default. See
+      <xref linkend="installation-layouts"/>.
+    </para>
+
+    <para>
+      MySQL installation requires a Mac OS X user account named
+      <literal>mysql</literal>. A user account with this name should
+      exist by default on Mac OS X 10.2 and up.
+    </para>
+
+  <para>
+      If you are running Mac OS X Server, a version of MySQL should
+      already be installed. The following table shows the versions of
+      MySQL that ship with Mac OS X Server versions.
+    </para>
+
+    <informaltable>
+      <tgroup cols="2">
+        <colspec colwidth="30*"/>
+        <colspec colwidth="30*"/>
+        <tbody>
+          <row>
+            <entry><emphasis role="bold">Mac OS X Server Version</emphasis></entry>
+            <entry><emphasis role="bold">MySQL Version</emphasis></entry>
+          </row>
+          <row>
+            <entry>10.2-10.2.2</entry>
+            <entry>3.23.51</entry>
+          </row>
+          <row>
+            <entry>10.2.3-10.2.6</entry>
+            <entry>3.23.53</entry>
+          </row>
+          <row>
+            <entry>10.3</entry>
+            <entry>4.0.14</entry>
+          </row>
+          <row>
+            <entry>10.3.2</entry>
+            <entry>4.0.16</entry>
+          </row>
+          <row>
+            <entry>10.4.0</entry>
+            <entry>4.1.10a</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para>
+      This manual section covers the installation of the official MySQL
+      Mac OS X PKG only. Make sure to read Apple's help information
+      about installing MySQL: Run the <quote>Help View</quote>
+      application, select <quote>Mac OS X Server</quote> help, do a
+      search for <quote>MySQL,</quote> and read the item entitled
+      <quote>Installing MySQL.</quote>
+    </para>
+
+    <para>
+      If you want MySQL to start automatically during system startup,
+      you also need to install the MySQL Startup Item. It is part of the
+      Mac OS X installation disk images as a separate installation
+      package. Simply double-click the
+      <guiicon>MySQLStartupItem.pkg</guiicon> icon and follow the
+      instructions to install it. The Startup Item need be installed
+      only once. There is no need to install it each time you upgrade
+      the MySQL package later.
+    </para>
+
+    <para>
+      The Startup Item for MySQL is installed into
+      <filename>/Library/StartupItems/MySQLCOM</filename>. (Before MySQL
+      4.1.2, the location was
+      <filename>/Library/StartupItems/MySQL</filename>, but that
+      collided with the MySQL Startup Item installed by Mac OS X
+      Server.) Startup Item installation adds a variable
+      <literal>MYSQLCOM=-YES-</literal> to the system configuration file
+      <filename>/etc/hostconfig</filename>. If you want to disable the
+      automatic startup of MySQL, simply change this variable to
+      <literal>MYSQLCOM=-NO-</literal>.
+    </para>
+
+    <para>
+      On Mac OS X Server, the default MySQL installation uses the
+      variable <literal>MYSQL</literal> in the
+      <filename>/etc/hostconfig</filename> file. The MySQL Startup Item
+      installer disables this variable by setting it to
+      <literal>MYSQL=-NO-</literal>. This avoids boot time conflicts
+      with the <literal>MYSQLCOM</literal> variable used by the MySQL
+      Startup Item. However, it does not shut down a running MySQL
+      server. You should do that yourself.
+    </para>
+
+    <para>
+      After the installation, you can start up MySQL by running the
+      following commands in a terminal window. You must have
+      administrator privileges to perform this task.
+    </para>
+
+    <para>
+      If you have installed the Startup Item, use this command:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>sudo /Library/StartupItems/MySQLCOM/MySQLCOM start</userinput>
+<replaceable>(Enter your password, if necessary)</replaceable>
+<replaceable>(Press Control-D or enter "exit" to exit the shell)</replaceable>
+</programlisting>
+
+    <para>
+      If you don't use the Startup Item, enter the following command
+      sequence:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>cd /usr/local/mysql</userinput>
+shell&gt; <userinput>sudo ./bin/mysqld_safe</userinput>
+<replaceable>(Enter your password, if necessary)</replaceable>
+<replaceable>(Press Control-Z)</replaceable>
+shell&gt; <userinput>bg</userinput>
+<replaceable>(Press Control-D or enter "exit" to exit the shell)</replaceable>
+</programlisting>
+
+    <para>
+      You should be able to connect to the MySQL server, for example, by
+      running <filename>/usr/local/mysql/bin/mysql</filename>.
+    </para>
+
+    <note>
+      <para>
+        The accounts that are listed in the MySQL grant tables initially
+        have no passwords. After starting the server, you should set up
+        passwords for them using the instructions in
+        <xref linkend="post-installation"/>.
+      </para>
+    </note>
+
+    <para>
+      You might want to add aliases to your shell's resource file to
+      make it easier to access commonly used programs such as
+      <command>mysql</command> and <command>mysqladmin</command> from
+      the command line. The syntax for <command>bash</command> is:
+    </para>
+
+<programlisting>
+alias mysql=/usr/local/mysql/bin/mysql
+alias mysqladmin=/usr/local/mysql/bin/mysqladmin
+</programlisting>
+
+    <para>
+      For <command>tcsh</command>, use:
+    </para>
+
+<programlisting>
+alias mysql /usr/local/mysql/bin/mysql
+alias mysqladmin /usr/local/mysql/bin/mysqladmin
+</programlisting>
+
+    <para>
+      Even better, add <literal>/usr/local/mysql/bin</literal> to your
+      <literal>PATH</literal> environment variable. You can do this by
+      modifying the appropriate startup file for your shell. For more
+      information, see <xref linkend="invoking-programs"/>.
+    </para>
+
+    <para>
+      If you are upgrading an existing installation, note that
+      installing a new MySQL PKG does not remove the directory of an
+      older installation. Unfortunately, the Mac OS X Installer does not
+      yet offer the functionality required to properly upgrade
+      previously installed packages.
+    </para>
+
+    <para>
+      To use your existing databases with the new installation, you'll
+      need to copy the contents of the old data directory to the new
+      data directory. Make sure that neither the old server nor the new
+      one is running when you do this. After you have copied over the
+      MySQL database files from the previous installation and have
+      successfully started the new server, you should consider removing
+      the old installation files to save disk space. Additionally, you
+      should also remove older versions of the Package Receipt
+      directories located in
+      <filename>/Library/Receipts/mysql-<replaceable>VERSION</replaceable>.pkg</filename>.
+    </para>
+
+  </section>


Added: trunk/refman-5.1/installing-perl.xml
===================================================================
--- trunk/refman-5.1/installing-perl.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-perl.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 559, Lines Deleted: 0; 18215 bytes

@@ -0,0 +1,559 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="perl-support">
+
+    <title>Perl Installation Notes</title>
+
+    <indexterm>
+      <primary>Perl</primary>
+      <secondary>installing</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>installing</primary>
+      <secondary>Perl</secondary>
+    </indexterm>
+
+    <para>
+      Perl support for MySQL is provided by means of the
+      <literal>DBI</literal>/<literal>DBD</literal> client interface.
+      The interface requires Perl 5.6.0, and 5.6.1 or later is
+      preferred. DBI <emphasis>does not work</emphasis> if you have an
+      older version of Perl.
+    </para>
+
+    <para>
+      If you want to use transactions with Perl DBI, you need to have
+      <literal>DBD::mysql</literal> 2.0900. If you are using the MySQL
+      4.1 or newer client library, you must use
+      <literal>DBD::mysql</literal> 2.9003 or newer. Support for
+      server-side prepared statements requires
+      <literal>DBD::mysql</literal> 3.0009 or newer.
+    </para>
+
+    <para>
+      Perl support is not included with MySQL distributions. You can
+      obtain the necessary modules from
+      <ulink url="http://search.cpan.org"/> for Unix, or by using the
+      ActiveState <command>ppm</command> program on Windows. The
+      following sections describe how to do this.
+    </para>
+
+    <para>
+      Perl support for MySQL must be installed if you want to run the
+      MySQL benchmark scripts; see <xref linkend="mysql-benchmarks"/>.
+      It is also required for the MySQL Cluster
+      <command>ndb_size.pl</command> utility; see
+      <xref linkend="mysql-cluster-programs-ndb-size-pl"/>.
+    </para>
+
+    <section id="perl-installation">
+
+      <title>Installing Perl on Unix</title>
+
+      <para>
+        MySQL Perl support requires that you have installed MySQL client
+        programming support (libraries and header files). Most
+        installation methods install the necessary files. However, if
+        you installed MySQL from RPM files on Linux, be sure that you've
+        installed the developer RPM. The client programs are in the
+        client RPM, but client programming support is in the developer
+        RPM.
+      </para>
+
+      <para>
+        If you want to install Perl support, the files you need can be
+        obtained from the CPAN (Comprehensive Perl Archive Network) at
+        <ulink url="http://search.cpan.org"/>.
+      </para>
+
+      <para>
+        The easiest way to install Perl modules on Unix is to use the
+        <literal>CPAN</literal> module. For example:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>perl -MCPAN -e shell</userinput>
+cpan&gt; install DBI
+cpan&gt; install DBD::mysql
+</programlisting>
+
+      <para>
+        The <literal>DBD::mysql</literal> installation runs a number of
+        tests. These tests attempt to connect to the local MySQL server
+        using the default user name and password. (The default user name
+        is your login name on Unix, and <literal>ODBC</literal> on
+        Windows. The default password is <quote>no password.</quote>) If
+        you cannot connect to the server with those values (for example,
+        if your account has a password), the tests fail. You can use
+        <literal>force install DBD::mysql</literal> to ignore the failed
+        tests.
+      </para>
+
+      <para>
+        <literal>DBI</literal> requires the
+        <literal>Data::Dumper</literal> module. It may be installed; if
+        not, you should install it before installing
+        <literal>DBI</literal>.
+      </para>
+
+      <para>
+        It is also possible to download the module distributions in the
+        form of compressed <command>tar</command> archives and build the
+        modules manually. For example, to unpack and build a DBI
+        distribution, use a procedure such as this:
+      </para>
+
+      <orderedlist>
+
+        <listitem>
+          <para>
+            Unpack the distribution into the current directory:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>gunzip &lt; DBI-<replaceable>VERSION</replaceable>.tar.gz | tar xvf -</userinput>
+</programlisting>
+
+          <para>
+            This command creates a directory named
+            <filename>DBI-<replaceable>VERSION</replaceable></filename>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Change location into the top-level directory of the unpacked
+            distribution:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>cd DBI-<replaceable>VERSION</replaceable></userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            Build the distribution and compile everything:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>perl Makefile.PL</userinput>
+shell&gt; <userinput>make</userinput>
+shell&gt; <userinput>make test</userinput>
+shell&gt; <userinput>make install</userinput>
+</programlisting>
+        </listitem>
+
+      </orderedlist>
+
+      <para>
+        The <command>make test</command> command is important because it
+        verifies that the module is working. Note that when you run that
+        command during the <literal>DBD::mysql</literal> installation to
+        exercise the interface code, the MySQL server must be running or
+        the test fails.
+      </para>
+
+      <para>
+        It is a good idea to rebuild and reinstall the
+        <literal>DBD::mysql</literal> distribution whenever you install
+        a new release of MySQL, particularly if you notice symptoms such
+        as that all your <literal>DBI</literal> scripts fail after you
+        upgrade MySQL.
+      </para>
+
+      <para>
+        If you do not have access rights to install Perl modules in the
+        system directory or if you want to install local Perl modules,
+        the following reference may be useful:
+        <ulink url="http://servers.digitaldaze.com/extensions/perl/modules.html#modules"/>
+      </para>
+
+      <para>
+        Look under the heading <quote>Installing New Modules that
+        Require Locally Installed Modules.</quote>
+      </para>
+
+    </section>
+
+    <section id="activestate-perl">
+
+      <title>Installing ActiveState Perl on Windows</title>
+
+      <indexterm>
+        <primary>installing</primary>
+        <secondary>Perl on Windows</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>Perl</primary>
+        <secondary>installing on Windows</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>ActiveState Perl</primary>
+      </indexterm>
+
+      <para>
+        On Windows, you should do the following to install the MySQL
+        <literal>DBD</literal> module with ActiveState Perl:
+      </para>
+
+      <orderedlist>
+
+        <listitem>
+          <para>
+            Get ActiveState Perl from
+            <ulink url="http://www.activestate.com/Products/ActivePerl/"/>
+            and install it.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Open a console window (a <quote>DOS window</quote>).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If necessary, set the <literal>HTTP_proxy</literal>
+            variable. For example, you might try a setting like this:
+          </para>
+
+<programlisting>
+set HTTP_proxy=my.proxy.com:3128
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            Start the PPM program:
+          </para>
+
+<programlisting>
+C:\&gt; <userinput>C:\perl\bin\ppm.pl</userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you have not previously done so, install
+            <literal>DBI</literal>:
+          </para>
+
+<programlisting>
+ppm&gt; <userinput>install DBI</userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            If this succeeds, run the following command:
+          </para>
+
+<programlisting>
+ppm&gt; <userinput>install DBD-mysql</userinput>
+</programlisting>
+        </listitem>
+
+      </orderedlist>
+
+      <para>
+        This procedure should work with ActiveState Perl 5.6 or newer.
+      </para>
+
+      <para>
+        If you cannot get the procedure to work, you should install the
+        MyODBC driver instead and connect to the MySQL server through
+        ODBC:
+      </para>
+
+<programlisting>
+use DBI;
+$dbh= DBI-&gt;connect("DBI:ODBC:$dsn",$user,$password) ||
+  die "Got error $DBI::errstr when connecting to $dsn\n";
+</programlisting>
+
+    </section>
+
+    <section id="perl-support-problems">
+
+      <title>Problems Using the Perl <literal>DBI</literal>/<literal>DBD</literal>
+        Interface</title>
+
+      <indexterm>
+        <primary>problems</primary>
+        <secondary>installing Perl</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>Perl DBI/DBD</primary>
+        <secondary>installation problems</secondary>
+      </indexterm>
+
+      <para>
+        If Perl reports that it cannot find the
+        <filename>../mysql/mysql.so</filename> module, the problem is
+        probably that Perl cannot locate the
+        <filename>libmysqlclient.so</filename> shared library. You
+        should be able to fix this problem by one of the following
+        methods:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Compile the <literal>DBD::mysql</literal> distribution with
+            <literal>perl Makefile.PL -static -config</literal> rather
+            than <literal>perl Makefile.PL</literal>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Copy <filename>libmysqlclient.so</filename> to the directory
+            where your other shared libraries are located (probably
+            <filename>/usr/lib</filename> or <filename>/lib</filename>).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Modify the <option>-L</option> options used to compile
+            <literal>DBD::mysql</literal> to reflect the actual location
+            of <filename>libmysqlclient.so</filename>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            On Linux, you can add the path name of the directory where
+            <filename>libmysqlclient.so</filename> is located to the
+            <filename>/etc/ld.so.conf</filename> file.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
+              <primary>LD_RUN_PATH environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>LD_RUN_PATH</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>LD_LIBRARY_PATH environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>LD_LIBRARY_PATH</secondary>
+            </indexterm>
+
+            Add the path name of the directory where
+            <filename>libmysqlclient.so</filename> is located to the
+            <literal>LD_RUN_PATH</literal> environment variable. Some
+            systems use <literal>LD_LIBRARY_PATH</literal> instead.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        Note that you may also need to modify the <option>-L</option>
+        options if there are other libraries that the linker fails to
+        find. For example, if the linker cannot find
+        <literal>libc</literal> because it is in
+        <filename>/lib</filename> and the link command specifies
+        <option>-L/usr/lib</option>, change the <option>-L</option>
+        option to <option>-L/lib</option> or add <option>-L/lib</option>
+        to the existing link command.
+      </para>
+
+      <para>
+        If you get the following errors from
+        <literal>DBD::mysql</literal>, you are probably using
+        <command>gcc</command> (or using an old binary compiled with
+        <command>gcc</command>):
+      </para>
+
+<programlisting>
+/usr/bin/perl: can't resolve symbol '__moddi3'
+/usr/bin/perl: can't resolve symbol '__divdi3'
+</programlisting>
+
+      <para>
+        Add <option>-L/usr/lib/gcc-lib/... -lgcc</option> to the link
+        command when the <filename>mysql.so</filename> library gets
+        built (check the output from <command>make</command> for
+        <filename>mysql.so</filename> when you compile the Perl client).
+        The <option>-L</option> option should specify the path name of
+        the directory where <filename>libgcc.a</filename> is located on
+        your system.
+      </para>
+
+      <para>
+        Another cause of this problem may be that Perl and MySQL are not
+        both compiled with <command>gcc</command>. In this case, you can
+        solve the mismatch by compiling both with
+        <command>gcc</command>.
+      </para>
+
+      <para>
+        You may see the following error from
+        <literal>DBD::mysql</literal> when you run the tests:
+      </para>
+
+<programlisting>
+t/00base............install_driver(mysql) failed:
+Can't load '../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql:
+../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol:
+uncompress at /usr/lib/perl5/5.00503/i586-linux/DynaLoader.pm line 169.
+</programlisting>
+
+      <para>
+        This means that you need to include the <option>-lz</option>
+        compression library on the link line. That can be done by
+        changing the following line in the file
+        <filename>lib/DBD/mysql/Install.pm</filename>:
+      </para>
+
+<programlisting>
+$sysliblist .= " -lm";
+</programlisting>
+
+      <para>
+        Change that line to:
+      </para>
+
+<programlisting>
+$sysliblist .= " -lm -lz";
+</programlisting>
+
+      <para>
+        After this, you <emphasis>must</emphasis> run <command>make
+        realclean</command> and then proceed with the installation from
+        the beginning.
+      </para>
+
+      <para>
+        If you want to install DBI on SCO, you have to edit the
+        <filename>Makefile</filename> in
+        DBI-<replaceable>xxx</replaceable> and each subdirectory. Note
+        that the following assumes <command>gcc</command> 2.95.2 or
+        newer:
+      </para>
+
+<programlisting>
+OLD:                                  NEW:
+CC = cc                               CC = gcc
+CCCDLFLAGS = -KPIC -W1,-Bexport       CCCDLFLAGS = -fpic
+CCDLFLAGS = -wl,-Bexport              CCDLFLAGS =
+
+LD = ld                               LD = gcc -G -fpic
+LDDLFLAGS = -G -L/usr/local/lib       LDDLFLAGS = -L/usr/local/lib
+LDFLAGS = -belf -L/usr/local/lib      LDFLAGS = -L/usr/local/lib
+
+LD = ld                               LD = gcc -G -fpic
+OPTIMISE = -Od                        OPTIMISE = -O1
+
+OLD:
+CCCFLAGS = -belf -dy -w0 -U M_XENIX -DPERL_SCO5 -I/usr/local/include
+
+NEW:
+CCFLAGS = -U M_XENIX -DPERL_SCO5 -I/usr/local/include
+</programlisting>
+
+      <para>
+        These changes are necessary because the Perl dynaloader does not
+        load the <literal>DBI</literal> modules if they were compiled
+        with <command>icc</command> or <command>cc</command>.
+      </para>
+
+      <para>
+        If you want to use the Perl module on a system that does not
+        support dynamic linking (such as SCO), you can generate a static
+        version of Perl that includes <literal>DBI</literal> and
+        <literal>DBD::mysql</literal>. The way this works is that you
+        generate a version of Perl with the <literal>DBI</literal> code
+        linked in and install it on top of your current Perl. Then you
+        use that to build a version of Perl that additionally has the
+        <literal>DBD</literal> code linked in, and install that.
+      </para>
+
+      <para>
+        On SCO, you must have the following environment variables set:
+      </para>
+
+<programlisting>
+LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/progressive/lib
+</programlisting>
+
+      <para>
+        Or:
+      </para>
+
+<programlisting>
+LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:\
+    /usr/progressive/lib:/usr/skunk/lib
+LIBPATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:\
+    /usr/progressive/lib:/usr/skunk/lib
+MANPATH=scohelp:/usr/man:/usr/local1/man:/usr/local/man:\
+    /usr/skunk/man:
+</programlisting>
+
+      <para>
+        First, create a Perl that includes a statically linked
+        <literal>DBI</literal> module by running these commands in the
+        directory where your <literal>DBI</literal> distribution is
+        located:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>perl Makefile.PL -static -config</userinput>
+shell&gt; <userinput>make</userinput>
+shell&gt; <userinput>make install</userinput>
+shell&gt; <userinput>make perl</userinput>
+</programlisting>
+
+      <para>
+        Then you must install the new Perl. The output of <command>make
+        perl</command> indicates the exact <command>make</command>
+        command you need to execute to perform the installation. On SCO,
+        this is <command>make -f Makefile.aperl inst_perl
+        MAP_TARGET=perl</command>.
+      </para>
+
+      <para>
+        Next, use the just-created Perl to create another Perl that also
+        includes a statically linked <literal>DBD::mysql</literal> by
+        running these commands in the directory where your
+        <literal>DBD::mysql</literal> distribution is located:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>perl Makefile.PL -static -config</userinput>
+shell&gt; <userinput>make</userinput>
+shell&gt; <userinput>make install</userinput>
+shell&gt; <userinput>make perl</userinput>
+</programlisting>
+
+      <para>
+        Finally, you should install this new Perl. Again, the output of
+        <command>make perl</command> indicates the command to use.
+      </para>
+
+    </section>
+
+  </section>


Added: trunk/refman-5.1/installing-postinstall.xml
===================================================================
--- trunk/refman-5.1/installing-postinstall.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-postinstall.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 2139, Lines Deleted: 0; 77791 bytes

@@ -0,0 +1,2139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="post-installation">
+
+    <title>Post-Installation Setup and Testing</title>
+
+    <indexterm>
+      <primary>post-installation</primary>
+      <secondary>setup and testing</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>testing</primary>
+      <secondary>post-installation</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>setup</primary>
+      <secondary>post-installation</secondary>
+    </indexterm>
+
+    <para>
+      After installing MySQL, there are some issues that you should
+      address. For example, on Unix, you should initialize the data
+      directory and create the MySQL grant tables. On all platforms, an
+      important security concern is that the initial accounts in the
+      grant tables have no passwords. You should assign passwords to
+      prevent unauthorized access to the MySQL server. Optionally, you
+      can create time zone tables to enable recognition of named time
+      zones.
+    </para>
+
+    <para>
+      The following sections include post-installation procedures that
+      are specific to Windows systems and to Unix systems. Another
+      section, <xref linkend="starting-server"/>, applies to all
+      platforms; it describes what to do if you have trouble getting the
+      server to start. <xref linkend="default-privileges"/>, also
+      applies to all platforms. You should follow its instructions to
+      make sure that you have properly protected your MySQL accounts by
+      assigning passwords to them.
+    </para>
+
+    <para>
+      When you are ready to create additional user accounts, you can
+      find information on the MySQL access control system and account
+      management in <xref linkend="privilege-system"/>, and
+      <xref linkend="user-account-management"/>.
+    </para>
+
+    <section id="windows-post-installation">
+
+      <title>Windows Post-Installation Procedures</title>
+
+      <para>
+        On Windows, the data directory and the grant tables do not have
+        to be created. MySQL Windows distributions include the grant
+        tables with a set of preinitialized accounts in the
+        <literal>mysql</literal> database under the data directory. It
+        is unnecessary to run the <command>mysql_install_db</command>
+        script that is used on Unix. Regarding passwords, if you
+        installed MySQL using the Windows Installation Wizard, you may
+        have already assigned passwords to the accounts. (See
+        <xref linkend="windows-install-wizard"/>.) Otherwise, use the
+        password-assignment procedure given in
+        <xref linkend="default-privileges"/>.
+      </para>
+
+      <para>
+        Before setting up passwords, you might want to try running some
+        client programs to make sure that you can connect to the server
+        and that it is operating properly. Make sure that the server is
+        running (see <xref linkend="windows-server-first-start"/>), and
+        then issue the following commands to verify that you can
+        retrieve information from the server. The output should be
+        similar to what is shown here:
+      </para>
+
+<programlisting>
+C:\&gt; <userinput>C:\mysql\bin\mysqlshow</userinput>
++--------------------+
+|     Databases      |
++--------------------+
+| information_schema |
+| mysql              |
+| test               |
++--------------------+
+
+C:\&gt; <userinput>C:\mysql\bin\mysqlshow mysql</userinput>
+Database: mysql
++---------------------------+
+|          Tables           |
++---------------------------+
+| columns_priv              |
+| db                        |
+| event                     |
+| func                      |
+| general_log               |
+| help_category             |
+| help_keyword              |
+| help_relation             |
+| help_topic                |
+| host                      |
+| plugin                    |
+| proc                      |
+| procs_priv                |
+| servers                   |
+| slow_log                  |
+| tables_priv               |
+| time_zone                 |
+| time_zone_leap_second     |
+| time_zone_name            |
+| time_zone_transition      |
+| time_zone_transition_type |
+| user                      |
++---------------------------+
+
+
+C:\&gt; <userinput>C:\mysql\bin\mysql -e "SELECT Host,Db,User FROM db" mysql</userinput>
++------+-------+------+
+| host | db    | user |
++------+-------+------+
+| %    | test% |      |
++------+-------+------+
+</programlisting>
+
+      <para>
+        You may need to specify a different directory from the one
+        shown; if you used the Windows Installation Wizard, then the
+        default directory is <filename>C:\Program Files\MySQL\MySQL
+        Server &current-series;</filename>, and the
+        <command>mysql</command> and <command>mysqlshow</command> client
+        programs are in <filename>C:\Program Files\MySQL\MySQL Server
+        &current-series;\bin</filename>. See
+        <xref linkend="windows-install-wizard"/>, for more information.
+      </para>
+
+      <para>
+        If you have already secured the initial MySQL accounts, you may
+        need to use the <option>-u</option> and <option>-p</option>
+        options to supply a user name and password to the
+        <command>mysqlshow</command> and <command>mysql</command> client
+        programs; otherwise the programs may fail with an error, or you
+        may not be able to view all databases. For example, if you have
+        assigned the password <quote>secretpass</quote> to the MySQL
+        <literal>root</literal> account, then you can invoke
+        <command>mysqlshow</command> and <command>mysql</command> as
+        shown here:
+
+<programlisting>
+C:\&gt; <userinput>C:\mysql\bin\mysqlshow -uroot -psecretpass</userinput>
++--------------------+
+|     Databases      |
++--------------------+
+| information_schema |
+| mysql              |
+| test               |
++--------------------+
+
+C:\&gt; <userinput>C:\mysql\bin\mysqlshow -uroot -psecretpass mysql</userinput>
+Database: mysql
++---------------------------+
+|          Tables           |
++---------------------------+
+| columns_priv              |
+| db                        |
+| event                     |
+| func                      |
+| general_log               |
+| help_category             |
+| help_keyword              |
+| help_relation             |
+| help_topic                |
+| host                      |
+| plugin                    |
+| proc                      |
+| procs_priv                |
+| servers                   |
+| slow_log                  |
+| tables_priv               |
+| time_zone                 |
+| time_zone_leap_second     |
+| time_zone_name            |
+| time_zone_transition      |
+| time_zone_transition_type |
+| user                      |
++---------------------------+
+
+
+C:\&gt; <userinput>C:\mysql\bin\mysql -uroot -psecretpass -e "SELECT Host,Db,User FROM db" mysql</userinput>
++------+-------+------+
+| host | db    | user |
++------+-------+------+
+| %    | test% |      |
++------+-------+------+
+</programlisting>
+
+        For more information about these programs, see
+        <xref linkend="mysqlshow"/>, and <xref linkend="mysql"/>.
+      </para>
+
+      <para>
+        If you are running a version of Windows that supports services
+        and you want the MySQL server to run automatically when Windows
+        starts, see <xref linkend="windows-start-service"/>.
+      </para>
+
+    </section>
+
+    <section id="unix-post-installation">
+
+      <title>Unix Post-Installation Procedures</title>
+
+      <remark role="todo">
+        Many of the testing commands actually are not specific to Unix,
+        so they could be split out into a platform-neutral testing
+        procedure...
+      </remark>
+
+      <para>
+        After installing MySQL on Unix, you need to initialize the grant
+        tables, start the server, and make sure that the server works
+        satisfactorily. You may also wish to arrange for the server to
+        be started and stopped automatically when your system starts and
+        stops. You should also assign passwords to the accounts in the
+        grant tables.
+      </para>
+
+      <para>
+        On Unix, the grant tables are set up by the
+        <command>mysql_install_db</command> program. For some
+        installation methods, this program is run for you automatically:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            If you install MySQL on Linux using RPM distributions, the
+            server RPM runs <command>mysql_install_db</command>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you install MySQL on Mac OS X using a PKG distribution,
+            the installer runs <command>mysql_install_db</command>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        Otherwise, you'll need to run
+        <command>mysql_install_db</command> yourself.
+      </para>
+
+      <para>
+        The following procedure describes how to initialize the grant
+        tables (if that has not previously been done) and then start the
+        server. It also suggests some commands that you can use to test
+        whether the server is accessible and working properly. For
+        information about starting and stopping the server
+        automatically, see <xref linkend="automatic-start"/>.
+      </para>
+
+      <para>
+        After you complete the procedure and have the server running,
+        you should assign passwords to the accounts created by
+        <command>mysql_install_db</command>. Instructions for doing so
+        are given in <xref linkend="default-privileges"/>.
+      </para>
+
+      <para>
+        In the examples shown here, the server runs under the user ID of
+        the <literal>mysql</literal> login account. This assumes that
+        such an account exists. Either create the account if it does not
+        exist, or substitute the name of a different existing login
+        account that you plan to use for running the server.
+      </para>
+
+      <indexterm>
+        <primary>starting</primary>
+        <secondary>the server</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>server</primary>
+        <secondary>starting</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>testing</primary>
+        <secondary>installation</secondary>
+      </indexterm>
+
+      <orderedlist>
+
+        <listitem>
+          <para>
+            Change location into the top-level directory of your MySQL
+            installation, represented here by
+            <replaceable>BASEDIR</replaceable>:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>cd <replaceable>BASEDIR</replaceable></userinput>
+</programlisting>
+
+          <para>
+            <replaceable>BASEDIR</replaceable> is likely to be something
+            like <filename>/usr/local/mysql</filename> or
+            <filename>/usr/local</filename>. The following steps assume
+            that you are located in this directory.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If necessary, run the <command>mysql_install_db</command>
+            program to set up the initial MySQL grant tables containing
+            the privileges that determine how users are allowed to
+            connect to the server. You'll need to do this if you used a
+            distribution type for which the installation procedure
+            doesn't run the program for you.
+          </para>
+
+          <para>
+            Typically, <command>mysql_install_db</command> needs to be
+            run only the first time you install MySQL, so you can skip
+            this step if you are upgrading an existing installation,
+            However, <command>mysql_install_db</command> does not
+            overwrite any existing privilege tables, so it should be
+            safe to run in any circumstances.
+          </para>
+
+          <para>
+            To initialize the grant tables, use one of the following
+            commands, depending on whether
+            <command>mysql_install_db</command> is located in the
+            <literal>bin</literal> or <literal>scripts</literal>
+            directory:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysql_install_db --user=mysql</userinput>
+shell&gt; <userinput>scripts/mysql_install_db --user=mysql</userinput>
+</programlisting>
+
+          <para>
+            It might be necessary to specify other options such as
+            <option role="mysql_install_db">--basedir</option> or
+            <option role="mysql_install_db">--datadir</option> if
+            <command>mysql_install_db</command> does not use the correct
+            locations for the installation directory or data directory.
+            For example:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysql_install_db --user=mysql \</userinput>
+         <userinput>--basedir=/opt/mysql/mysql \</userinput>
+         <userinput>--datadir=/opt/mysql/mysql/data</userinput>
+</programlisting>
+
+          <para>
+            The <command>mysql_install_db</command> script creates the
+            server's data directory. Under the data directory, it
+            creates directories for the <literal>mysql</literal>
+            database that holds all database privileges and the
+            <literal>test</literal> database that you can use to test
+            MySQL. The script also creates privilege table entries for
+            <literal>root</literal> and anonymous-user accounts. The
+            accounts have no passwords initially. A description of their
+            initial privileges is given in
+            <xref linkend="default-privileges"/>. Briefly, these
+            privileges allow the MySQL <literal>root</literal> user to
+            do anything, and allow anybody to create or use databases
+            with a name of <literal>test</literal> or starting with
+            <literal>test_</literal>.
+          </para>
+
+          <para>
+            It is important to make sure that the database directories
+            and files are owned by the <literal>mysql</literal> login
+            account so that the server has read and write access to them
+            when you run it later. To ensure this, the
+            <option>--user</option> option should be used as shown if
+            you run <command>mysql_install_db</command> as
+            <literal>root</literal>. Otherwise, you should execute the
+            script while logged in as <literal>mysql</literal>, in which
+            case you can omit the <option>--user</option> option from
+            the command.
+          </para>
+
+          <para>
+            <command>mysql_install_db</command> creates several tables
+            in the <literal>mysql</literal> database, including
+            <literal>user</literal>, <literal>db</literal>,
+            <literal>host</literal>, <literal>tables_priv</literal>,
+            <literal>columns_priv</literal>, <literal>func</literal>,
+            and others. See <xref linkend="privilege-system"/>, for a
+            complete listing and description of these tables.
+          </para>
+
+          <para>
+            If you don't want to have the <literal>test</literal>
+            database, you can remove it with <command>mysqladmin -u root
+            drop test</command> after starting the server.
+          </para>
+
+          <para>
+            If you have trouble with <command>mysql_install_db</command>
+            at this point, see
+            <xref linkend="mysql-install-db-problems"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Start the MySQL server:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysqld_safe --user=mysql &amp;</userinput>
+</programlisting>
+
+          <para>
+            It is important that the MySQL server be run using an
+            unprivileged (non-<literal>root</literal>) login account. To
+            ensure this, the <option role="mysqld_safe">--user</option>
+            option should be used as shown if you run
+            <command>mysqld_safe</command> as system
+            <literal>root</literal>. Otherwise, you should execute the
+            script while logged in to the system as
+            <literal>mysql</literal>, in which case you can omit the
+            <option role="mysqld_safe">--user</option> option from the
+            command.
+          </para>
+
+          <para>
+            Further instructions for running MySQL as an unprivileged
+            user are given in <xref linkend="changing-mysql-user"/>.
+          </para>
+
+          <para>
+            If you neglected to create the grant tables before
+            proceeding to this step, the following message appears in
+            the error log file when you start the server:
+          </para>
+
+          <indexterm>
+            <primary>host.frm</primary>
+            <secondary>problems finding</secondary>
+          </indexterm>
+
+<programlisting>
+mysqld: Can't find file: 'host.frm'
+</programlisting>
+
+          <para>
+            If you have other problems starting the server, see
+            <xref linkend="starting-server"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Use <command>mysqladmin</command> to verify that the server
+            is running. The following commands provide simple tests to
+            check whether the server is up and responding to
+            connections:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysqladmin version</userinput>
+shell&gt; <userinput>bin/mysqladmin variables</userinput>
+</programlisting>
+
+          <para>
+            The output from <command>mysqladmin version</command> varies
+            slightly depending on your platform and version of MySQL,
+            but should be similar to that shown here:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysqladmin version</userinput>
+mysqladmin  Ver 14.12 Distrib &current-version;, for pc-linux-gnu on i686
+...
+
+Server version          &current-version;
+Protocol version        10
+Connection              Localhost via UNIX socket
+UNIX socket             /var/lib/mysql/mysql.sock
+Uptime:                 14 days 5 hours 5 min 21 sec
+
+Threads: 1  Questions: 366  Slow queries: 0
+Opens: 0  Flush tables: 1  Open tables: 19
+Queries per second avg: 0.000
+</programlisting>
+
+          <para>
+            To see what else you can do with
+            <command>mysqladmin</command>, invoke it with the
+            <option role="mysqladmin">--help</option> option.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
+              <primary>server</primary>
+              <secondary>shutdown</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>shutting down</primary>
+              <secondary>the server</secondary>
+            </indexterm>
+
+            Verify that you can shut down the server:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysqladmin -u root shutdown</userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            Verify that you can start the server again. Do this by using
+            <command>mysqld_safe</command> or by invoking
+            <command>mysqld</command> directly. For example:
+          </para>
+
+          <indexterm>
+            <primary>server</primary>
+            <secondary>restart</secondary>
+          </indexterm>
+
+          <indexterm>
+            <primary>restarting</primary>
+            <secondary>the server</secondary>
+          </indexterm>
+
+<programlisting>
+shell&gt; <userinput>bin/mysqld_safe --user=mysql --log &amp;</userinput>
+</programlisting>
+
+          <para>
+            If <command>mysqld_safe</command> fails, see
+            <xref linkend="starting-server"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Run some simple tests to verify that you can retrieve
+            information from the server. The output should be similar to
+            what is shown here:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysqlshow</userinput>
++-----------+
+| Databases |
++-----------+
+| mysql     |
+| test      |
++-----------+
+
+shell&gt; <userinput>bin/mysqlshow mysql</userinput>
+Database: mysql
++---------------------------+
+|          Tables           |
++---------------------------+
+| columns_priv              |
+| db                        |
+| func                      |
+| help_category             |
+| help_keyword              |
+| help_relation             |
+| help_topic                |
+| host                      |
+| proc                      |
+| procs_priv                |
+| tables_priv               |
+| time_zone                 |
+| time_zone_leap_second     |
+| time_zone_name            |
+| time_zone_transition      |
+| time_zone_transition_type |
+| user                      |
++---------------------------+
+
+shell&gt; <userinput>bin/mysql -e "SELECT Host,Db,User FROM db" mysql</userinput>
++------+--------+------+
+| host | db     | user |
++------+--------+------+
+| %    | test   |      |
+| %    | test_% |      |
++------+--------+------+
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            There is a benchmark suite in the
+            <filename>sql-bench</filename> directory (under the MySQL
+            installation directory) that you can use to compare how
+            MySQL performs on different platforms. The benchmark suite
+            is written in Perl. It requires the Perl DBI module that
+            provides a database-independent interface to the various
+            databases, and some other additional Perl modules:
+          </para>
+
+<programlisting>
+DBI
+DBD::mysql
+Data::Dumper
+Data::ShowTable
+</programlisting>
+
+          <para>
+            These modules can be obtained from CPAN
+            (<ulink url="http://www.cpan.org/"/>). See also
+            <xref linkend="perl-installation"/>.
+          </para>
+
+          <para>
+            The <filename>sql-bench/Results</filename> directory
+            contains the results from many runs against different
+            databases and platforms. To run all tests, execute these
+            commands:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>cd sql-bench</userinput>
+shell&gt; <userinput>perl run-all-tests</userinput>
+</programlisting>
+
+          <para>
+            If you don't have the <filename>sql-bench</filename>
+            directory, you probably installed MySQL using RPM files
+            other than the source RPM. (The source RPM includes the
+            <filename>sql-bench</filename> benchmark directory.) In this
+            case, you must first install the benchmark suite before you
+            can use it. There are separate benchmark RPM files named
+            <filename>mysql-bench-<replaceable>VERSION</replaceable>.i386.rpm</filename>
+            that contain benchmark code and data.
+          </para>
+
+          <para>
+            If you have a source distribution, there are also tests in
+            its <filename>tests</filename> subdirectory that you can
+            run. For example, to run
+            <filename>auto_increment.tst</filename>, execute this
+            command from the top-level directory of your source
+            distribution:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>mysql -vvf test &lt; ./tests/auto_increment.tst</userinput>
+</programlisting>
+
+          <para>
+            The expected result of the test can be found in the
+            <filename>./tests/auto_increment.res</filename> file.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            At this point, you should have the server running. However,
+            none of the initial MySQL accounts have a password, so you
+            should assign passwords using the instructions found in
+            <xref linkend="default-privileges"/>.
+          </para>
+        </listitem>
+
+      </orderedlist>
+
+      <para>
+        The MySQL &current-series; installation procedure creates time
+        zone tables in the <literal>mysql</literal> database. However,
+        you must populate the tables manually using the instructions in
+        <xref linkend="time-zone-support"/>.
+      </para>
+
+      <section id="mysql-install-db-problems">
+
+        <title>Problems Running <command>mysql_install_db</command></title>
+
+        <indexterm>
+          <primary>mysql_install_db</primary>
+        </indexterm>
+
+        <indexterm>
+          <primary>scripts</primary>
+          <secondary>mysql_install_db</secondary>
+        </indexterm>
+
+        <para>
+          The purpose of the <command>mysql_install_db</command> script
+          is to generate new MySQL privilege tables. It does not
+          overwrite existing MySQL privilege tables, and it does not
+          affect any other data.
+        </para>
+
+        <para>
+          If you want to re-create your privilege tables, first stop the
+          <command>mysqld</command> server if it is running. Then rename
+          the <filename>mysql</filename> directory under the data
+          directory to save it, and then run
+          <command>mysql_install_db</command>. Suppose that your current
+          directory is the MySQL installation directory and that
+          <command>mysql_install_db</command> is located in the
+          <filename>bin</filename> directory and the data directory is
+          named <filename>data</filename>. To rename the
+          <literal>mysql</literal> database and re-run
+          <command>mysql_install_db</command>, use these commands.
+        </para>
+
+<programlisting>
+shell&gt; <userinput>mv data/mysql data/mysql.old</userinput>
+shell&gt; <userinput>bin/mysql_install_db --user=mysql</userinput>
+</programlisting>
+
+        <para>
+          When you run <command>mysql_install_db</command>, you might
+          encounter the following problems:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <emphasis role="bold"><command>mysql_install_db</command>
+              fails to install the grant tables</emphasis>
+            </para>
+
+            <para>
+              You may find that <command>mysql_install_db</command>
+              fails to install the grant tables and terminates after
+              displaying the following messages:
+            </para>
+
+<programlisting>
+Starting mysqld daemon with databases from XXXXXX
+mysqld ended
+</programlisting>
+
+            <para>
+              In this case, you should examine the error log file very
+              carefully. The log should be located in the directory
+              <filename>XXXXXX</filename> named by the error message and
+              should indicate why <command>mysqld</command> didn't
+              start. If you do not understand what happened, include the
+              log when you post a bug report. See
+              <xref linkend="bug-reports"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">There is a <command>mysqld</command>
+              process running</emphasis>
+            </para>
+
+            <para>
+              This indicates that the server is running, in which case
+              the grant tables have probably been created already. If
+              so, there is no need to run
+              <command>mysql_install_db</command> at all because it
+              needs to be run only once (when you install MySQL the
+              first time).
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Installing a second
+              <command>mysqld</command> server does not work when one
+              server is running</emphasis>
+            </para>
+
+            <para>
+              This can happen when you have an existing MySQL
+              installation, but want to put a new installation in a
+              different location. For example, you might have a
+              production installation, but you want to create a second
+              installation for testing purposes. Generally the problem
+              that occurs when you try to run a second server is that it
+              tries to use a network interface that is in use by the
+              first server. In this case, you should see one of the
+              following error messages:
+            </para>
+
+<programlisting>
+Can't start server: Bind on TCP/IP port:
+Address already in use
+Can't start server: Bind on unix socket...
+</programlisting>
+
+            <para>
+              For instructions on setting up multiple servers, see
+              <xref linkend="multiple-servers"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <indexterm>
+                <primary>write access</primary>
+                <secondary>tmp</secondary>
+              </indexterm>
+
+              <indexterm>
+                <primary>temporary file</primary>
+                <secondary>write access</secondary>
+              </indexterm>
+
+              <indexterm>
+                <primary>files</primary>
+                <secondary>tmp</secondary>
+              </indexterm>
+
+              <emphasis role="bold">You do not have write access to the
+              <filename>/tmp</filename> directory</emphasis>
+            </para>
+
+            <para>
+              If you do not have write access to create temporary files
+              or a Unix socket file in the default location (the
+              <filename>/tmp</filename> directory), an error occurs when
+              you run <command>mysql_install_db</command> or the
+              <command>mysqld</command> server.
+            </para>
+
+            <para>
+              You can specify different locations for the temporary
+              directory and Unix socket file by executing these commands
+              prior to starting <command>mysql_install_db</command> or
+              <command>mysqld</command>, where
+              <replaceable>some_tmp_dir</replaceable> is the full path
+              name to some directory for which you have write
+              permission:
+            </para>
+
+            <indexterm>
+              <primary>TMPDIR environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>MYSQL_UNIX_PORT environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>TMPDIR</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>MYSQL_UNIX_PORT</secondary>
+            </indexterm>
+
+<programlisting>
+shell&gt; <userinput>TMPDIR=/<replaceable>some_tmp_dir</replaceable>/</userinput>
+shell&gt; <userinput>MYSQL_UNIX_PORT=/<replaceable>some_tmp_dir</replaceable>/mysql.sock</userinput>
+shell&gt; <userinput>export TMPDIR MYSQL_UNIX_PORT</userinput>
+</programlisting>
+
+            <para>
+              Then you should be able to run
+              <command>mysql_install_db</command> and start the server
+              with these commands:
+            </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysql_install_db --user=mysql</userinput>
+shell&gt; <userinput>bin/mysqld_safe --user=mysql &amp;</userinput>
+</programlisting>
+
+            <para>
+              If <command>mysql_install_db</command> is located in the
+              <filename>scripts</filename> directory, modify the first
+              command to <literal>scripts/mysql_install_db</literal>.
+            </para>
+
+            <para>
+              See <xref linkend="problems-with-mysql-sock"/>, and
+              <xref linkend="environment-variables"/>.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          There are some alternatives to running the
+          <command>mysql_install_db</command> script provided in the
+          MySQL distribution:
+        </para>
+
+        <indexterm>
+          <primary>grant tables</primary>
+          <secondary>re-creating</secondary>
+        </indexterm>
+
+        <indexterm>
+          <primary>re-creating</primary>
+          <secondary>grant tables</secondary>
+        </indexterm>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              If you want the initial privileges to be different from
+              the standard defaults, you can modify
+              <command>mysql_install_db</command> before you run it.
+              However, it is preferable to use
+              <literal role="stmt">GRANT</literal> and
+              <literal role="stmt">REVOKE</literal> to change the
+              privileges <emphasis>after</emphasis> the grant tables
+              have been set up. In other words, you can run
+              <command>mysql_install_db</command>, and then use
+              <literal>mysql -u root mysql</literal> to connect to the
+              server as the MySQL <literal>root</literal> user so that
+              you can issue the necessary
+              <literal role="stmt">GRANT</literal> and
+              <literal role="stmt">REVOKE</literal> statements.
+            </para>
+
+            <para>
+              If you want to install MySQL on several machines with the
+              same privileges, you can put the
+              <literal role="stmt">GRANT</literal> and
+              <literal role="stmt">REVOKE</literal> statements in a file
+              and execute the file as a script using
+              <literal>mysql</literal> after running
+              <command>mysql_install_db</command>. For example:
+            </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysql_install_db --user=mysql</userinput>
+shell&gt; <userinput>bin/mysql -u root &lt; your_script_file</userinput>
+</programlisting>
+
+            <para>
+              By doing this, you can avoid having to issue the
+              statements manually on each machine.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              It is possible to re-create the grant tables completely
+              after they have previously been created. You might want to
+              do this if you're just learning how to use
+              <literal role="stmt">GRANT</literal> and
+              <literal role="stmt">REVOKE</literal> and have made so
+              many modifications after running
+              <command>mysql_install_db</command> that you want to wipe
+              out the tables and start over.
+            </para>
+
+            <para>
+              To re-create the grant tables, remove all the
+              <filename>.frm</filename>, <filename>.MYI</filename>, and
+              <filename>.MYD</filename> files in the
+              <literal>mysql</literal> database directory. Then run the
+              <command>mysql_install_db</command> script again.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              You can start <command>mysqld</command> manually using the
+              <option role="mysqld">--skip-grant-tables</option> option
+              and add the privilege information yourself using
+              <command>mysql</command>:
+            </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysqld_safe --user=mysql --skip-grant-tables &amp;</userinput>
+shell&gt; <userinput>bin/mysql mysql</userinput>
+</programlisting>
+
+            <para>
+              From <command>mysql</command>, manually execute the SQL
+              commands contained in <command>mysql_install_db</command>.
+              Make sure that you run <command>mysqladmin
+              flush-privileges</command> or <command>mysqladmin
+              reload</command> afterward to tell the server to reload
+              the grant tables.
+            </para>
+
+            <para>
+              Note that by not using
+              <command>mysql_install_db</command>, you not only have to
+              populate the grant tables manually, you also have to
+              create them first.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+      </section>
+
+      <section id="automatic-start">
+
+        <title>Starting and Stopping MySQL Automatically</title>
+
+        <indexterm>
+          <primary>starting</primary>
+          <secondary>the server automatically</secondary>
+        </indexterm>
+
+        <indexterm>
+          <primary>stopping</primary>
+          <secondary>the server</secondary>
+        </indexterm>
+
+        <indexterm>
+          <primary>server</primary>
+          <secondary>starting and stopping</secondary>
+        </indexterm>
+
+        <para>
+          Generally, you start the <command>mysqld</command> server in
+          one of these ways:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              Invoke <command>mysqld</command> directly. This works on
+              any platform.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Run the MySQL server as a Windows service. The service can
+              be set to start the server automatically when Windows
+              starts, or as a manual service that you start on request.
+              For instructions, see
+              <xref linkend="windows-start-service"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Invoke <command>mysqld_safe</command>, which tries to
+              determine the proper options for <command>mysqld</command>
+              and then runs it with those options. This script is used
+              on Unix and Unix-like systems. See
+              <xref linkend="mysqld-safe"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Invoke <command>mysql.server</command>. This script is
+              used primarily at system startup and shutdown on systems
+              that use System V-style run directories, where it usually
+              is installed under the name <literal>mysql</literal>. The
+              <command>mysql.server</command> script starts the server
+              by invoking <command>mysqld_safe</command>. See
+              <xref linkend="mysql-server"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              On Mac OS X, install a separate MySQL Startup Item package
+              to enable the automatic startup of MySQL on system
+              startup. The Startup Item starts the server by invoking
+              <command>mysql.server</command>. See
+              <xref linkend="mac-os-x-installation"/>, for details.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          The <command>mysqld_safe</command> and
+          <command>mysql.server</command> scripts and the Mac OS X
+          Startup Item can be used to start the server manually, or
+          automatically at system startup time.
+          <command>mysql.server</command> and the Startup Item also can
+          be used to stop the server.
+        </para>
+
+        <para>
+          To start or stop the server manually using the
+          <command>mysql.server</command> script, invoke it with
+          <literal>start</literal> or <literal>stop</literal> arguments:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>mysql.server start</userinput>
+shell&gt; <userinput>mysql.server stop</userinput>
+</programlisting>
+
+        <para>
+          Before <command>mysql.server</command> starts the server, it
+          changes location to the MySQL installation directory, and then
+          invokes <command>mysqld_safe</command>. If you want the server
+          to run as some specific user, add an appropriate
+          <literal>user</literal> option to the
+          <literal>[mysqld]</literal> group of the
+          <filename>/etc/my.cnf</filename> option file, as shown later
+          in this section. (It is possible that you will need to edit
+          <command>mysql.server</command> if you've installed a binary
+          distribution of MySQL in a nonstandard location. Modify it to
+          change location into the proper directory before it runs
+          <command>mysqld_safe</command>. If you do this, your modified
+          version of <command>mysql.server</command> may be overwritten
+          if you upgrade MySQL in the future, so you should make a copy
+          of your edited version that you can reinstall.)
+        </para>
+
+        <para>
+          <command>mysql.server stop</command> stops the server by
+          sending a signal to it. You can also stop the server manually
+          by executing <command>mysqladmin shutdown</command>.
+        </para>
+
+        <para>
+          To start and stop MySQL automatically on your server, you need
+          to add start and stop commands to the appropriate places in
+          your <filename>/etc/rc*</filename> files.
+        </para>
+
+        <para>
+          If you use the Linux server RPM package
+          (<literal>MySQL-server-<replaceable>VERSION</replaceable>.rpm</literal>),
+          the <command>mysql.server</command> script is installed in the
+          <filename>/etc/init.d</filename> directory with the name
+          <filename>mysql</filename>. You need not install it manually.
+          See <xref linkend="linux-rpm"/>, for more information on the
+          Linux RPM packages.
+        </para>
+
+        <para>
+          Some vendors provide RPM packages that install a startup
+          script under a different name such as
+          <command>mysqld</command>.
+        </para>
+
+        <para>
+          If you install MySQL from a source distribution or using a
+          binary distribution format that does not install
+          <command>mysql.server</command> automatically, you can install
+          it manually. The script can be found in the
+          <filename>support-files</filename> directory under the MySQL
+          installation directory or in a MySQL source tree.
+        </para>
+
+        <para>
+          To install <command>mysql.server</command> manually, copy it
+          to the <filename>/etc/init.d</filename> directory with the
+          name <command>mysql</command>, and then make it executable. Do
+          this by changing location into the appropriate directory where
+          <command>mysql.server</command> is located and executing these
+          commands:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>cp mysql.server /etc/init.d/mysql</userinput>
+shell&gt; <userinput>chmod +x /etc/init.d/mysql</userinput>
+</programlisting>
+
+        <para>
+          Older Red Hat systems use the
+          <filename>/etc/rc.d/init.d</filename> directory rather than
+          <filename>/etc/init.d</filename>. Adjust the preceding
+          commands accordingly. Alternatively, first create
+          <filename>/etc/init.d</filename> as a symbolic link that
+          points to <filename>/etc/rc.d/init.d</filename>:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>cd /etc</userinput>
+shell&gt; <userinput>ln -s rc.d/init.d .</userinput>
+</programlisting>
+
+        <para>
+          After installing the script, the commands needed to activate
+          it to run at system startup depend on your operating system.
+          On Linux, you can use <literal>chkconfig</literal>:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>chkconfig --add mysql</userinput>
+</programlisting>
+
+        <para>
+          On some Linux systems, the following command also seems to be
+          necessary to fully enable the <command>mysql</command> script:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>chkconfig --level 345 mysql on</userinput>
+</programlisting>
+
+        <para>
+          On FreeBSD, startup scripts generally should go in
+          <filename>/usr/local/etc/rc.d/</filename>. The
+          <literal>rc(8)</literal> manual page states that scripts in
+          this directory are executed only if their basename matches the
+          <literal>*.sh</literal> shell file name pattern. Any other
+          files or directories present within the directory are silently
+          ignored. In other words, on FreeBSD, you should install the
+          <filename>mysql.server</filename> script as
+          <filename>/usr/local/etc/rc.d/mysql.server.sh</filename> to
+          enable automatic startup.
+        </para>
+
+        <para>
+          As an alternative to the preceding setup, some operating
+          systems also use <filename>/etc/rc.local</filename> or
+          <filename>/etc/init.d/boot.local</filename> to start
+          additional services on startup. To start up MySQL using this
+          method, you could append a command like the one following to
+          the appropriate startup file:
+        </para>
+
+<programlisting>
+/bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe --user=mysql &amp;'
+</programlisting>
+
+        <para>
+          For other systems, consult your operating system documentation
+          to see how to install startup scripts.
+        </para>
+
+        <indexterm>
+          <primary>changing socket location</primary>
+        </indexterm>
+
+        <para>
+          You can add options for <command>mysql.server</command> in a
+          global <filename>/etc/my.cnf</filename> file. A typical
+          <filename>/etc/my.cnf</filename> file might look like this:
+        </para>
+
+<programlisting>
+[mysqld]
+datadir=/usr/local/mysql/var
+socket=/var/tmp/mysql.sock
+port=3306
+user=mysql
+
+[mysql.server]
+basedir=/usr/local/mysql
+</programlisting>
+
+        <para>
+          The <command>mysql.server</command> script supports the
+          following options: <option>basedir</option>,
+          <option>datadir</option>, and <option>pid-file</option>. If
+          specified, they <emphasis>must</emphasis> be placed in an
+          option file, not on the command line.
+          <command>mysql.server</command> supports only
+          <literal>start</literal> and <literal>stop</literal> as
+          command-line arguments.
+        </para>
+
+        <para>
+          The following table shows which option groups the server and
+          each startup script read from option files.
+        </para>
+
+        <informaltable>
+          <tgroup cols="2">
+            <colspec colwidth="20*"/>
+            <colspec colwidth="80*"/>
+            <tbody>
+              <row>
+                <entry><emphasis role="bold">Script</emphasis></entry>
+                <entry><emphasis role="bold">Option Groups</emphasis></entry>
+              </row>
+              <row>
+                <entry><command>mysqld</command></entry>
+                <entry><literal>[mysqld]</literal>, <literal>[server]</literal>,
+                  <literal>[mysqld-<replaceable>major_version</replaceable>]</literal></entry>
+              </row>
+              <row>
+                <entry><command>mysqld_safe</command></entry>
+                <entry><literal>[mysqld]</literal>, <literal>[server]</literal>,
+                  <literal>[mysqld_safe]</literal></entry>
+              </row>
+              <row>
+                <entry><command>mysql.server</command></entry>
+                <entry><literal>[mysqld]</literal>, <literal>[mysql.server]</literal>,
+                  <literal>[server]</literal></entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable>
+
+        <para>
+          <literal>[mysqld-<replaceable>major_version</replaceable>]</literal>
+          means that groups with names like
+          <literal>[mysqld-&previous-series;]</literal> and
+          <literal>[mysqld-&current-series;]</literal> are read by
+          servers having versions &previous-series;.x,
+          &current-series;.x, and so forth. This feature can be used to
+          specify options that can be read only by servers within a
+          given release series.
+        </para>
+
+        <para>
+          For backward compatibility, <command>mysql.server</command>
+          also reads the <literal>[mysql_server]</literal> group and
+          <command>mysqld_safe</command> also reads the
+          <literal>[safe_mysqld]</literal> group. However, you should
+          update your option files to use the
+          <literal>[mysql.server]</literal> and
+          <literal>[mysqld_safe]</literal> groups instead when using
+          MySQL &current-series;.
+        </para>
+
+        <para>
+          See <xref linkend="option-files"/>.
+        </para>
+
+      </section>
+
+      <section id="starting-server">
+
+        <title>Starting and Troubleshooting the MySQL Server</title>
+
+        <indexterm>
+          <primary>server</primary>
+          <secondary>starting problems</secondary>
+        </indexterm>
+
+        <indexterm>
+          <primary>problems</primary>
+          <secondary>starting the server</secondary>
+        </indexterm>
+
+        <para>
+          This section provides troubleshooting suggestions for problems
+          starting the server on Unix. If you are using Windows, see
+          <xref linkend="windows-troubleshooting"/>.
+        </para>
+
+        <para>
+          If you have problems starting the server, here are some things
+          to try:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              Check the error log to see why the server does not start.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Specify any special options needed by the storage engines
+              you are using.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Make sure that the server knows where to find the data
+              directory.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Make sure that the server can access the data directory.
+              The ownership and permissions of the data directory and
+              its contents must be set such that the server can read and
+              modify them.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Verify that the network interfaces the server wants to use
+              are available.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          Some storage engines have options that control their behavior.
+          You can create a <filename>my.cnf</filename> file and specify
+          startup options for the engines that you plan to use. If you
+          are going to use storage engines that support transactional
+          tables (<literal>InnoDB</literal>,
+          <literal role="se">NDB</literal>), be sure that you have them
+          configured the way you want before starting the server:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              If you are using <literal>InnoDB</literal> tables, see
+              <xref linkend="innodb-configuration"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              If you are using MySQL Cluster, see
+              <xref linkend="mysql-cluster-configuration"/>.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <formalpara role="mnmas">
+
+          <title>MySQL Enterprise</title>
+
+          <para>
+            For expert advice on start-up options appropriate to your
+            circumstances, subscribe to The MySQL Enterprise Monitor.
+            For more information, see
+            <ulink url="&base-url-enterprise;advisors.html"/>.
+          </para>
+
+        </formalpara>
+
+        <para>
+          Storage engines will use default option values if you specify
+          none, but it is recommended that you review the available
+          options and specify explicit values for those for which the
+          defaults are not appropriate for your installation.
+        </para>
+
+        <para>
+          When the <command>mysqld</command> server starts, it changes
+          location to the data directory. This is where it expects to
+          find databases and where it expects to write log files. The
+          server also writes the pid (process ID) file in the data
+          directory.
+        </para>
+
+        <para>
+          The data directory location is hardwired in when the server is
+          compiled. This is where the server looks for the data
+          directory by default. If the data directory is located
+          somewhere else on your system, the server will not work
+          properly. You can determine what the default path settings are
+          by invoking <command>mysqld</command> with the
+          <option role="mysqld">--verbose</option> and
+          <option role="mysqld">--help</option> options.
+        </para>
+
+        <para>
+          If the default locations don't match the MySQL installation
+          layout on your system, you can override them by specifying
+          options to <command>mysqld</command> or
+          <command>mysqld_safe</command> on the command line or in an
+          option file.
+        </para>
+
+        <para>
+          To specify the location of the data directory explicitly, use
+          the <option role="mysqld">--datadir</option> option. However,
+          normally you can tell <command>mysqld</command> the location
+          of the base directory under which MySQL is installed and it
+          looks for the data directory there. You can do this with the
+          <option role="mysqld">--basedir</option> option.
+        </para>
+
+        <para>
+          To check the effect of specifying path options, invoke
+          <command>mysqld</command> with those options followed by the
+          <option role="mysqld">--verbose</option> and
+          <option role="mysqld">--help</option> options. For example, if
+          you change location into the directory where
+          <command>mysqld</command> is installed and then run the
+          following command, it shows the effect of starting the server
+          with a base directory of <filename>/usr/local</filename>:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>./mysqld --basedir=/usr/local --verbose --help</userinput>
+</programlisting>
+
+        <para>
+          You can specify other options such as
+          <option role="mysqld">--datadir</option> as well, but
+          <option role="mysqld">--verbose</option> and
+          <option role="mysqld">--help</option> must be the last
+          options.
+        </para>
+
+        <para>
+          Once you determine the path settings you want, start the
+          server without <option role="mysqld">--verbose</option> and
+          <option role="mysqld">--help</option>.
+        </para>
+
+        <para>
+          If <command>mysqld</command> is currently running, you can
+          find out what path settings it is using by executing this
+          command:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>mysqladmin variables</userinput>
+</programlisting>
+
+        <para>
+          Or:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>mysqladmin -h <replaceable>host_name</replaceable> variables</userinput>
+</programlisting>
+
+        <para>
+          <replaceable>host_name</replaceable> is the name of the MySQL
+          server host.
+        </para>
+
+        <para>
+          If you get <literal>Errcode 13</literal> (which means
+          <literal>Permission denied</literal>) when starting
+          <command>mysqld</command>, this means that the privileges of
+          the data directory or its contents do not allow the server
+          access. In this case, you change the permissions for the
+          involved files and directories so that the server has the
+          right to use them. You can also start the server as
+          <literal>root</literal>, but this raises security issues and
+          should be avoided.
+        </para>
+
+        <para>
+          On Unix, change location into the data directory and check the
+          ownership of the data directory and its contents to make sure
+          the server has access. For example, if the data directory is
+          <filename>/usr/local/mysql/var</filename>, use this command:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>ls -la /usr/local/mysql/var</userinput>
+</programlisting>
+
+        <para>
+          If the data directory or its files or subdirectories are not
+          owned by the login account that you use for running the
+          server, change their ownership to that account. If the account
+          is named <literal>mysql</literal>, use these commands:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>chown -R mysql /usr/local/mysql/var</userinput>
+shell&gt; <userinput>chgrp -R mysql /usr/local/mysql/var</userinput>
+</programlisting>
+
+        <remark role="note">
+          On my system the RPMs installed the binaries and scripts to
+          /usr/local/bin and set the datadir as /var/lib/mysql (SuSE
+          9.3, MySQL 5.0.7-beta) /JS
+        </remark>
+
+        <para>
+          If it possible that even with correct ownership, MySQL may
+          fail to start up if there is other security software running
+          on your system that manages application access to various
+          parts of the file system. In this case, you may need to
+          reconfigure that software to enable <command>mysqld</command>
+          to access the directories it uses during normal operation.
+        </para>
+
+        <para>
+          If the server fails to start up correctly, check the error
+          log. Log files are located in the data directory (typically
+          <filename>C:\Program Files\MySQL\MySQL Server
+          &current-series;\data</filename> on Windows,
+          <filename>/usr/local/mysql/data</filename> for a Unix binary
+          distribution, and <filename>/usr/local/var</filename> for a
+          Unix source distribution). Look in the data directory for
+          files with names of the form
+          <filename><replaceable>host_name</replaceable>.err</filename>
+          and
+          <filename><replaceable>host_name</replaceable>.log</filename>,
+          where <replaceable>host_name</replaceable> is the name of your
+          server host. Then examine the last few lines of these files.
+          On Unix, you can use <literal>tail</literal> to display them:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>tail <replaceable>host_name</replaceable>.err</userinput>
+shell&gt; <userinput>tail <replaceable>host_name</replaceable>.log</userinput>
+</programlisting>
+
+        <para>
+          The error log should contain information that indicates why
+          the server couldn't start.
+        </para>
+
+        <para>
+          If either of the following errors occur, it means that some
+          other program (perhaps another <command>mysqld</command>
+          server) is using the TCP/IP port or Unix socket file that
+          <command>mysqld</command> is trying to use:
+        </para>
+
+<programlisting>
+Can't start server: Bind on TCP/IP port: Address already in use
+Can't start server: Bind on unix socket...
+</programlisting>
+
+        <para>
+          Use <command>ps</command> to determine whether you have
+          another <command>mysqld</command> server running. If so, shut
+          down the server before starting <command>mysqld</command>
+          again. (If another server is running, and you really want to
+          run multiple servers, you can find information about how to do
+          so in <xref linkend="multiple-servers"/>.)
+        </para>
+
+        <para>
+          If no other server is running, try to execute the command
+          <literal>telnet <replaceable>your_host_name</replaceable>
+          <replaceable>tcp_ip_port_number</replaceable></literal>. (The
+          default MySQL port number is 3306.) Then press Enter a couple
+          of times. If you don't get an error message like
+          <literal>telnet: Unable to connect to remote host: Connection
+          refused</literal>, some other program is using the TCP/IP port
+          that <command>mysqld</command> is trying to use. You'll need
+          to track down what program this is and disable it, or else
+          tell <command>mysqld</command> to listen to a different port
+          with the <option role="mysqld">--port</option> option. In this
+          case, you'll also need to specify the port number for client
+          programs when connecting to the server via TCP/IP.
+        </para>
+
+        <para>
+          Another reason the port might be inaccessible is that you have
+          a firewall running that blocks connections to it. If so,
+          modify the firewall settings to allow access to the port.
+        </para>
+
+        <para>
+          If the server starts but you can't connect to it, you should
+          make sure that you have an entry in
+          <filename>/etc/hosts</filename> that looks like this:
+        </para>
+
+<programlisting>
+127.0.0.1       localhost
+</programlisting>
+
+        <para>
+          This problem occurs only on systems that do not have a working
+          thread library and for which MySQL must be configured to use
+          MIT-pthreads.
+        </para>
+
+        <para>
+          If you cannot get <command>mysqld</command> to start, you can
+          try to make a trace file to find the problem by using the
+          <option role="mysqld">--debug</option> option. See
+          <ulink url="http://forge.mysql.com/wiki/MySQL_Internals_Porting">MySQL
+          Internals: Porting</ulink>.
+        </para>
+
+      </section>
+
+    </section>
+
+    <section id="default-privileges">
+
+      <title>Securing the Initial MySQL Accounts</title>
+
+      <indexterm>
+        <primary>privileges</primary>
+        <secondary>default</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>default</primary>
+        <secondary>privileges</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>root password</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>superuser</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>accounts</primary>
+        <secondary>root</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>accounts</primary>
+        <secondary>anonymous user</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>users</primary>
+        <secondary>root</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>anonymous user</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>password</primary>
+        <secondary>root user</secondary>
+      </indexterm>
+
+      <para>
+        Part of the MySQL installation process is to set up the
+        <literal>mysql</literal> database that contains the grant
+        tables:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Windows distributions contain preinitialized grant tables
+            that are installed automatically.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            On Unix, the grant tables are populated by the
+            <command>mysql_install_db</command> program. Some
+            installation methods run this program for you. Others
+            require that you execute it manually. For details, see
+            <xref linkend="unix-post-installation"/>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        The grant tables define the initial MySQL user accounts and
+        their access privileges. These accounts are set up as follows:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Accounts with the user name <literal>root</literal> are
+            created. These are superuser accounts that can do anything.
+            The initial <literal>root</literal> account passwords are
+            empty, so anyone can connect to the MySQL server as
+            <literal>root</literal> &mdash; <emphasis>without a
+            password</emphasis> &mdash; and be granted all privileges.
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                On Windows, one <literal>root</literal> account is
+                created; this account allows connecting from the local
+                host only. The Windows installer will optionally create
+                an account allowing for connections from any host only
+                if the user selects the <guilabel>Enable root access
+                from remote machines</guilabel> option during
+                installation.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                On Unix, both <literal>root</literal> accounts are for
+                connections from the local host. Connections must be
+                made from the local host by specifying a host name of
+                <literal>localhost</literal> for one of the accounts, or
+                the actual host name or IP number for the other.
+              </para>
+            </listitem>
+
+          </itemizedlist>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
+              <primary>anonymous user</primary>
+            </indexterm>
+
+            Two anonymous-user accounts are created, each with an empty
+            user name. The anonymous accounts have no password, so
+            anyone can use them to connect to the MySQL server.
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                On Windows, one anonymous account is for connections
+                from the local host. It has no global privileges.
+                (Before MySQL 5.1.16, it has all global privileges, just
+                like the <literal>root</literal> accounts.) The other is
+                for connections from any host and has all privileges for
+                the <literal>test</literal> database and for other
+                databases with names that start with
+                <literal>test</literal>.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                On Unix, both anonymous accounts are for connections
+                from the local host. Connections must be made from the
+                local host by specifying a host name of
+                <literal>localhost</literal> for one of the accounts, or
+                the actual host name or IP number for the other. These
+                accounts have all privileges for the
+                <literal>test</literal> database and for other databases
+                with names that start with <literal>test_</literal>.
+              </para>
+            </listitem>
+
+          </itemizedlist>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        As noted, none of the initial accounts have passwords. This
+        means that your MySQL installation is unprotected until you do
+        something about it:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            If you want to prevent clients from connecting as anonymous
+            users without a password, you should either assign a
+            password to each anonymous account or else remove the
+            accounts.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            You should assign a password to each MySQL
+            <literal>root</literal> account.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        The following instructions describe how to set up passwords for
+        the initial MySQL accounts, first for the anonymous accounts and
+        then for the <literal>root</literal> accounts. Replace
+        <quote><replaceable>newpwd</replaceable></quote> in the examples
+        with the actual password that you want to use. The instructions
+        also cover how to remove the anonymous accounts, should you
+        prefer not to allow anonymous access at all.
+      </para>
+
+      <para>
+        You might want to defer setting the passwords until later, so
+        that you don't need to specify them while you perform additional
+        setup or testing. However, be sure to set them before using your
+        installation for production purposes.
+      </para>
+
+      <para>
+        <emphasis role="bold">Anonymous Account Password
+        Assignment</emphasis>
+      </para>
+
+      <para>
+        To assign passwords to the anonymous accounts, connect to the
+        server as <literal>root</literal> and then use either
+        <literal role="stmt">SET PASSWORD</literal> or
+        <literal role="stmt">UPDATE</literal>. In either case, be sure
+        to encrypt the password using the
+        <literal role="func">PASSWORD()</literal> function.
+      </para>
+
+      <para>
+        To use <literal role="stmt">SET PASSWORD</literal> on Windows,
+        do this:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysql -u root</userinput>
+mysql&gt; <userinput>SET PASSWORD FOR ''@'localhost' = PASSWORD('<replaceable>newpwd</replaceable>');</userinput>
+mysql&gt; <userinput>SET PASSWORD FOR ''@'%' = PASSWORD('<replaceable>newpwd</replaceable>');</userinput>
+</programlisting>
+
+      <para>
+        To use <literal role="stmt">SET PASSWORD</literal> on Unix, do
+        this:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysql -u root</userinput>
+mysql&gt; <userinput>SET PASSWORD FOR ''@'localhost' = PASSWORD('<replaceable>newpwd</replaceable>');</userinput>
+mysql&gt; <userinput>SET PASSWORD FOR ''@'<replaceable>host_name</replaceable>' = PASSWORD('<replaceable>newpwd</replaceable>');</userinput>
+</programlisting>
+
+      <para>
+        In the second <literal role="stmt">SET PASSWORD</literal>
+        statement, replace <replaceable>host_name</replaceable> with the
+        name of the server host. This is the name that is specified in
+        the <literal>Host</literal> column of the
+        non-<literal>localhost</literal> record for
+        <literal>root</literal> in the <literal>user</literal> table. If
+        you don't know what host name this is, issue the following
+        statement before using <literal role="stmt">SET
+        PASSWORD</literal>:
+      </para>
+
+<programlisting>
+mysql&gt; <userinput>SELECT Host, User FROM mysql.user;</userinput>
+</programlisting>
+
+      <para>
+        Look for the record that has <literal>root</literal> in the
+        <literal>User</literal> column and something other than
+        <literal>localhost</literal> in the <literal>Host</literal>
+        column. Then use that <literal>Host</literal> value in the
+        second <literal role="stmt">SET PASSWORD</literal> statement.
+      </para>
+
+      <para>
+        <emphasis role="bold">Anonymous Account Removal</emphasis>
+      </para>
+
+      <para>
+        If you prefer to remove the anonymous accounts instead, do so as
+        follows:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysql -u root</userinput>
+mysql&gt; <userinput>DROP USER '';</userinput>
+</programlisting>
+
+      <para>
+        The <literal>DROP</literal> statement applies both to Windows
+        and to Unix. On Windows, if you want to remove only the
+        anonymous account that has the same privileges as
+        <literal>root</literal>, do this instead:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysql -u root</userinput>
+mysql&gt; <userinput>DROP USER ''@'localhost';</userinput>
+</programlisting>
+
+      <para>
+        That account allows anonymous access but has full privileges, so
+        removing it improves security.
+      </para>
+
+      <para>
+        <emphasis role="bold"><literal>root</literal> Account Password
+        Assignment</emphasis>
+      </para>
+
+      <para>
+        You can assign passwords to the <literal>root</literal> accounts
+        in several ways. The following discussion demonstrates three
+        methods:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Use the <literal role="stmt">SET PASSWORD</literal>
+            statement
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Use the <command>mysqladmin</command> command-line client
+            program
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Use the <literal role="stmt">UPDATE</literal> statement
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        To assign passwords using <literal role="stmt">SET
+        PASSWORD</literal>, connect to the server as
+        <literal>root</literal> and issue <literal role="stmt">SET
+        PASSWORD</literal> statements. Be sure to encrypt the password
+        using the <literal role="func">PASSWORD()</literal> function.
+      </para>
+
+      <para>
+        For Windows, do this:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysql -u root</userinput>
+mysql&gt; <userinput>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('<replaceable>newpwd</replaceable>');</userinput>
+mysql&gt; <userinput>SET PASSWORD FOR 'root'@'%' = PASSWORD('<replaceable>newpwd</replaceable>');</userinput>
+</programlisting>
+
+      <para>
+        For Unix, do this:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysql -u root</userinput>
+mysql&gt; <userinput>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('<replaceable>newpwd</replaceable>');</userinput>
+mysql&gt; <userinput>SET PASSWORD FOR 'root'@'<replaceable>host_name</replaceable>' = PASSWORD('<replaceable>newpwd</replaceable>');</userinput>
+</programlisting>
+
+      <para>
+        In the second <literal role="stmt">SET PASSWORD</literal>
+        statement, replace <replaceable>host_name</replaceable> with the
+        name of the server host. This is the same host name that you
+        used when you assigned the anonymous account passwords.
+      </para>
+
+      <para>
+        If the <literal>user</literal> table contains an account with
+        <literal>User</literal> and <literal>Host</literal> values of
+        <literal>'root'</literal> and <literal>'127.0.0.1'</literal>,
+        use an additional <literal role="stmt">SET PASSWORD</literal>
+        statement to set that account's password:
+      </para>
+
+<programlisting>
+mysql&gt; <userinput>SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('<replaceable>newpwd</replaceable>');</userinput>
+</programlisting>
+
+      <para>
+        To assign passwords to the <literal>root</literal> accounts
+        using <command>mysqladmin</command>, execute the following
+        commands:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqladmin -u root password "<replaceable>newpwd</replaceable>"</userinput>
+shell&gt; <userinput>mysqladmin -u root -h <replaceable>host_name</replaceable> password "<replaceable>newpwd</replaceable>"</userinput>
+</programlisting>
+
+      <para>
+        These commands apply both to Windows and to Unix. In the second
+        command, replace <replaceable>host_name</replaceable> with the
+        name of the server host. The double quotes around the password
+        are not always necessary, but you should use them if the
+        password contains spaces or other characters that are special to
+        your command interpreter.
+      </para>
+
+      <para>
+        The <command>mysqladmin</command> method of setting the
+        <literal>root</literal> account passwords does not set the
+        password for the <literal>'root'@'127.0.0.1'</literal> account.
+        To do so, use <literal role="stmt">SET PASSWORD</literal> as
+        shown earlier.
+      </para>
+
+      <para>
+        You can also use <literal role="stmt">UPDATE</literal> to modify
+        the <literal>user</literal> table directly. The following
+        <literal role="stmt">UPDATE</literal> statement assigns a
+        password to all <literal>root</literal> accounts:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysql -u root</userinput>
+mysql&gt; <userinput>UPDATE mysql.user SET Password = PASSWORD('<replaceable>newpwd</replaceable>')</userinput>
+    -&gt;     <userinput>WHERE User = 'root';</userinput>
+mysql&gt; <userinput>FLUSH PRIVILEGES;</userinput>
+</programlisting>
+
+      <para>
+        The <literal role="stmt">UPDATE</literal> statement applies both
+        to Windows and to Unix.
+      </para>
+
+      <para>
+        After the passwords have been set, you must supply the
+        appropriate password whenever you connect to the server. For
+        example, if you want to use <command>mysqladmin</command> to
+        shut down the server, you can do so using this command:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqladmin -u root -p shutdown</userinput>
+Enter password: <replaceable>(enter root password here)</replaceable>
+</programlisting>
+
+      <note>
+        <para>
+          If you forget your <literal>root</literal> password after
+          setting it up, <xref linkend="resetting-permissions"/>, covers
+          the procedure for resetting it.
+        </para>
+      </note>
+
+      <para>
+        To set up additional accounts, you can use the
+        <literal role="stmt">GRANT</literal> statement. For
+        instructions, see <xref linkend="adding-users"/>.
+      </para>
+
+    </section>
+
+  </section>


Added: trunk/refman-5.1/installing-solaris.xml
===================================================================
--- trunk/refman-5.1/installing-solaris.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-solaris.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 373, Lines Deleted: 0; 10827 bytes

@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="solaris-installation">
+
+    <title>Installing MySQL on Solaris</title>
+
+    <indexterm>
+      <primary>Solaris</primary>
+      <secondary>installation</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>tar</primary>
+      <secondary>problems on Solaris</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>installing</primary>
+      <secondary>Solaris PKG packages</secondary>
+    </indexterm>
+
+
+      <indexterm>
+        <primary>Solaris installation problems</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>problems</primary>
+        <secondary>installing on Solaris</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>tar</primary>
+        <secondary>problems on Solaris</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>errors</primary>
+        <secondary>directory checksum</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>checksum errors</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>InnoDB</primary>
+        <secondary>Solaris 10 x86_64 issues</secondary>
+      </indexterm>
+
+    <para>
+      To obtain a binary MySQL distribution for Solaris in tarball or
+      PKG format,
+      <ulink url="&base-url-downloads;mysql/&current-series;.html"/>.
+    </para>
+
+    <para>
+      If you install MySQL using a binary tarball distribution on
+      Solaris, you may run into trouble even before you get the MySQL
+      distribution unpacked, as the Solaris <command>tar</command>
+      cannot handle long file names. This means that you may see errors
+      when you try to unpack MySQL.
+    </para>
+
+    <para>
+      If this occurs, you must use GNU <command>tar</command>
+      (<command>gtar</command>) to unpack the distribution.
+    </para>
+
+    <para>
+      You can install MySQL on Solaris using a binary package in PKG
+      format instead of the binary tarball distribution. Before
+      installing using the binary PKG format, you should create the
+      <literal>mysql</literal> user and group, for example:
+    </para>
+
+<programlisting>
+groupadd mysql
+useradd -g mysql mysql
+</programlisting>
+
+    <para>
+      Some basic PKG-handling commands follow:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          To add a package:
+        </para>
+
+<programlisting>
+pkgadd -d <replaceable>package_name</replaceable>.pkg
+</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          To remove a package:
+        </para>
+
+<programlisting>
+pkgrm <replaceable>package_name</replaceable>
+</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          To get a full list of installed packages:
+        </para>
+
+<programlisting>
+pkginfo
+</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          To get detailed information for a package:
+        </para>
+
+<programlisting>
+pkginfo -l <replaceable>package_name</replaceable>
+</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          To list the files belonging to a package:
+        </para>
+
+<programlisting>
+pkgchk -v <replaceable>package_name</replaceable>
+</programlisting>
+      </listitem>
+
+      <listitem>
+        <para>
+          To get packaging information for an arbitrary file:
+        </para>
+
+<programlisting>
+pkgchk -l -p <replaceable>file_name</replaceable>
+</programlisting>
+      </listitem>
+
+    </itemizedlist>
+<section id="solaris">
+
+      <title>Solaris Notes</title>
+
+
+      <para>
+        For information about installing MySQL on Solaris using PKG
+        distributions, see <xref linkend="solaris-installation"/>.
+      </para>
+
+      <para>
+        On Solaris, you may run into trouble even before you get the
+        MySQL distribution unpacked, as the Solaris
+        <command>tar</command> cannot handle long file names. This means
+        that you may see errors when you try to unpack MySQL.
+      </para>
+
+      <para>
+        If this occurs, you must use GNU <command>tar</command>
+        (<command>gtar</command>) to unpack the distribution.
+      </para>
+
+
+      <para>
+        If you have an UltraSPARC system, you can get 4% better
+        performance by adding <option>-mcpu=v8
+        -Wa,-xarch=v8plusa</option> to the <literal>CFLAGS</literal> and
+        <literal>CXXFLAGS</literal> environment variables.
+      </para>
+
+      <para>
+        If you have Sun's Forte 5.0 (or newer) compiler, you can run
+        <command>configure</command> like this:
+      </para>
+
+<programlisting>
+CC=cc CFLAGS="-Xa -fast -native -xstrconst -mt" \
+CXX=CC CXXFLAGS="-noex -mt" \
+./configure --prefix=/usr/local/mysql --enable-assembler
+</programlisting>
+
+      <para>
+        To create a 64-bit binary with Sun's Forte compiler, use the
+        following configuration options:
+      </para>
+
+<programlisting>
+CC=cc CFLAGS="-Xa -fast -native -xstrconst -mt -xarch=v9" \
+CXX=CC CXXFLAGS="-noex -mt -xarch=v9" ASFLAGS="-xarch=v9" \
+./configure --prefix=/usr/local/mysql --enable-assembler
+</programlisting>
+
+      <para>
+        To create a 64-bit Solaris binary using <command>gcc</command>,
+        add <option>-m64</option> to <literal>CFLAGS</literal> and
+        <literal>CXXFLAGS</literal> and remove
+        <option>--enable-assembler</option> from the
+        <command>configure</command> line.
+      </para>
+
+      <para>
+        In the MySQL benchmarks, we obtained a 4% speed increase on
+        UltraSPARC when using Forte 5.0 in 32-bit mode, as compared to
+        using <command>gcc</command> 3.2 with the <option>-mcpu</option>
+        flag.
+      </para>
+
+      <para>
+        If you create a 64-bit <command>mysqld</command> binary, it is
+        4% slower than the 32-bit binary, but can handle more threads
+        and memory.
+      </para>
+
+      <para>
+        When using Solaris 10 for x86_64, you should mount any file
+        systems on which you intend to store <literal>InnoDB</literal>
+        files with the <literal>forcedirectio</literal> option. (By
+        default mounting is done without this option.) Failing to do so
+        will cause a significant drop in performance when using the
+        <literal>InnoDB</literal> storage engine on this platform.
+      </para>
+
+      <para>
+        If you get a problem with <literal>fdatasync</literal> or
+        <literal>sched_yield</literal>, you can fix this by adding
+        <literal>LIBS=-lrt</literal> to the <command>configure</command>
+        line
+      </para>
+
+      <para>
+        Solaris does not provide static versions of all system libraries
+        (<literal>libpthreads</literal> and <literal>libdl</literal>),
+        so you cannot compile MySQL with <option>--static</option>. If
+        you try to do so, you get one of the following errors:
+      </para>
+
+<programlisting>
+ld: fatal: library -ldl: not found
+undefined reference to `dlopen'
+cannot find -lrt
+</programlisting>
+
+      <para>
+        If you link your own MySQL client programs, you may see the
+        following error at runtime:
+      </para>
+
+<programlisting>
+ld.so.1: fatal: libmysqlclient.so.#:
+open failed: No such file or directory
+</programlisting>
+
+      <para>
+        This problem can be avoided by one of the following methods:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Link clients with the
+            <option>-Wl,r/full/path/to/libmysqlclient.so</option> flag
+            rather than with <option>-Lpath</option>).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Copy <literal>libmysqclient.so</literal> to
+            <filename>/usr/lib</filename>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
+              <primary>LD_RUN_PATH environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>LD_RUN_PATH</secondary>
+            </indexterm>
+
+            Add the path name of the directory where
+            <filename>libmysqlclient.so</filename> is located to the
+            <literal>LD_RUN_PATH</literal> environment variable before
+            running your client.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        If you have problems with <command>configure</command> trying to
+        link with <option>-lz</option> when you don't have
+        <literal>zlib</literal> installed, you have two options:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            If you want to be able to use the compressed communication
+            protocol, you need to get and install
+            <literal>zlib</literal> from <literal>ftp.gnu.org</literal>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Run <command>configure</command> with the
+            <option>--with-named-z-libs=no</option> option when building
+            MySQL.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        If you are using <command>gcc</command> and have problems with
+        loading user-defined functions (UDFs) into MySQL, try adding
+        <option>-lgcc</option> to the link line for the UDF.
+      </para>
+
+      <para>
+        If you would like MySQL to start automatically, you can copy
+        <filename>support-files/mysql.server</filename> to
+        <filename>/etc/init.d</filename> and create a symbolic link to
+        it named <filename>/etc/rc3.d/S99mysql.server</filename>.
+      </para>
+
+      <para>
+        If too many processes try to connect very rapidly to
+        <command>mysqld</command>, you should see this error in the
+        MySQL log:
+      </para>
+
+<programlisting>
+Error in accept: Protocol error
+</programlisting>
+
+      <para>
+        You might try starting the server with the
+        <option role="sysvar">--back_log=50</option> option as a
+        workaround for this. (Use <option>-O back_log=50</option> before
+        MySQL 4.)
+      </para>
+
+      <para>
+        Solaris doesn't support core files for
+        <literal>setuid()</literal> applications, so you can't get a
+        core file from <command>mysqld</command> if you are using the
+        <option role="mysqld">--user</option> option.
+      </para>
+
+
+    </section>
+
+  </section>
\ No newline at end of file


Added: trunk/refman-5.1/installing-source-core.xml
===================================================================
--- trunk/refman-5.1/installing-source-core.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-source-core.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 3088, Lines Deleted: 0; 109121 bytes

@@ -0,0 +1,3088 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="installing-source">
+
+    <title>MySQL Installation Using a Source Distribution</title>
+
+    <indexterm>
+      <primary>installing</primary>
+      <secondary>source distribution</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>source distribution</primary>
+      <secondary>installing</secondary>
+    </indexterm>
+
+    <indexterm>
+      <primary>installation overview</primary>
+    </indexterm>
+
+    <para>
+      Before you proceed with an installation from source, first check
+      whether our binary is available for your platform and whether it
+      works for you. We put a great deal of effort into ensuring that
+      our binaries are built with the best possible options.
+    </para>
+
+    <para>
+      To obtain a source distribution for MySQL,
+      <xref linkend="getting-mysql"/>. If you want to build MySQL from
+      source on Windows, see <xref linkend="windows-source-build"/>.
+    </para>
+
+    <para>
+      MySQL source distributions are provided as compressed
+      <command>tar</command> archives and have names of the form
+      <filename>mysql-<replaceable>VERSION</replaceable>.tar.gz</filename>,
+      where <replaceable>VERSION</replaceable> is a number like
+      <literal>&current-version;</literal>.
+    </para>
+
+    <para>
+      You need the following tools to build and install MySQL from
+      source:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          GNU <literal>gunzip</literal> to uncompress the distribution.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A reasonable <command>tar</command> to unpack the
+          distribution. GNU <command>tar</command> is known to work.
+          Some operating systems come with a preinstalled version of
+          <command>tar</command> that is known to have problems. For
+          example, the <command>tar</command> provided with early
+          versions of Mac OS X, SunOS 4.x, Solaris 8, Solaris 9, Solaris
+          10 and OpenSolaris, and HP-UX are known to have problems with
+          long file names. On Mac OS X, you can use the preinstalled
+          <command>gnutar</command> program. On Solaris 10 and
+          OpenSolaris you can use the preinstalled
+          <command>gtar</command>. On other systems with a deficient
+          <command>tar</command>, you should install GNU
+          <command>tar</command> first.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A working ANSI C++ compiler. <command>gcc</command> 2.95.2 or
+          later, SGI C++, and SunPro C++ are some of the compilers that
+          are known to work. <literal>libg++</literal> is not needed
+          when using <command>gcc</command>. <command>gcc</command>
+          2.7.x has a bug that makes it impossible to compile some
+          perfectly legal C++ files, such as
+          <filename>sql/sql_base.cc</filename>. If you have only
+          <command>gcc</command> 2.7.x, you must upgrade your
+          <command>gcc</command> to be able to compile MySQL.
+          <command>gcc</command> 2.8.1 is also known to have problems on
+          some platforms, so it should be avoided if a newer compiler
+          exists for the platform. <command>gcc</command> 2.95.2 or
+          later is recommended.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A good <command>make</command> program. GNU
+          <command>make</command> is always recommended and is sometimes
+          required. (BSD <command>make</command> fails, and
+          vendor-provided <command>make</command> implementations may
+          fail as well.) If you have problems, use GNU
+          <command>make</command> 3.75 or newer.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <command>libtool</command> 1.5.24 or later is also
+          recommended.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
+      If you are using a version of <command>gcc</command> recent enough
+      to understand the <option>-fno-exceptions</option> option, it is
+      <emphasis>very important</emphasis> that you use this option.
+      Otherwise, you may compile a binary that crashes randomly. Also
+      use <option>-felide-constructors</option> and
+      <option>-fno-rtti</option> along with
+      <option>-fno-exceptions</option>. When in doubt, do the following:
+    </para>
+
+<programlisting>
+CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
+       -fno-exceptions -fno-rtti" ./configure \
+       --prefix=/usr/local/mysql --enable-assembler \
+       --with-mysqld-ldflags=-all-static
+</programlisting>
+
+    <para>
+      On most systems, this gives you a fast and stable binary.
+    </para>
+
+    <para>
+      If you run into problems and need to file a bug report, please use
+      the instructions in <xref linkend="bug-reports"/>.
+    </para>
+
+    <section id="quick-install">
+
+      <title>Source Installation Overview</title>
+
+      <para>
+        The basic commands that you must execute to install a MySQL
+        source distribution are:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>groupadd mysql</userinput>
+shell&gt; <userinput>useradd -g mysql mysql</userinput>
+shell&gt; <userinput>gunzip &lt; mysql-<replaceable>VERSION</replaceable>.tar.gz | tar -xvf -</userinput>
+shell&gt; <userinput>cd mysql-<replaceable>VERSION</replaceable></userinput>
+shell&gt; <userinput>./configure --prefix=/usr/local/mysql</userinput>
+shell&gt; <userinput>make</userinput>
+shell&gt; <userinput>make install</userinput>
+shell&gt; <userinput>cp support-files/my-medium.cnf /etc/my.cnf</userinput>
+shell&gt; <userinput>cd /usr/local/mysql</userinput>
+shell&gt; <userinput>chown -R mysql .</userinput>
+shell&gt; <userinput>chgrp -R mysql .</userinput>
+shell&gt; <userinput>bin/mysql_install_db --user=mysql</userinput>
+shell&gt; <userinput>chown -R root .</userinput>
+shell&gt; <userinput>chown -R mysql var</userinput>
+shell&gt; <userinput>bin/mysqld_safe --user=mysql &amp;</userinput>
+</programlisting>
+
+      <para>
+        If you start from a source RPM, do the following:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>rpmbuild --rebuild --clean MySQL-<replaceable>VERSION</replaceable>.src.rpm</userinput>
+</programlisting>
+
+      <para>
+        This makes a binary RPM that you can install. For older versions
+        of RPM, you may have to replace the command
+        <command>rpmbuild</command> with <command>rpm</command> instead.
+      </para>
+
+      <note>
+        <para>
+          This procedure does not set up any passwords for MySQL
+          accounts. After following the procedure, proceed to
+          <xref linkend="post-installation"/>, for post-installation
+          setup and testing.
+        </para>
+      </note>
+
+      <para>
+        A more detailed version of the preceding description for
+        installing MySQL from a source distribution follows:
+      </para>
+
+      <orderedlist>
+
+        <listitem>
+          <para>
+            Add a login user and group for <command>mysqld</command> to
+            run as:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>groupadd mysql</userinput>
+shell&gt; <userinput>useradd -g mysql mysql</userinput>
+</programlisting>
+
+          <para>
+            These commands add the <literal>mysql</literal> group and
+            the <literal>mysql</literal> user. The syntax for
+            <command>useradd</command> and <command>groupadd</command>
+            may differ slightly on different versions of Unix, or they
+            may have different names such as <command>adduser</command>
+            and <command>addgroup</command>.
+          </para>
+
+          <para>
+            You might want to call the user and group something else
+            instead of <literal>mysql</literal>. If so, substitute the
+            appropriate name in the following steps.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Perform the following steps as the <literal>mysql</literal>
+            user, except as noted.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Pick the directory under which you want to unpack the
+            distribution and change location into it.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Obtain a distribution file using the instructions in
+            <xref linkend="getting-mysql"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Unpack the distribution into the current directory:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>gunzip &lt; <replaceable>/path/to/mysql-VERSION</replaceable>.tar.gz | tar xvf -</userinput>
+</programlisting>
+
+          <para>
+            This command creates a directory named
+            <filename>mysql-<replaceable>VERSION</replaceable></filename>.
+          </para>
+
+          <para>
+            With GNU <command>tar</command>, no separate invocation of
+            <literal>gunzip</literal> is necessary. You can use the
+            following alternative command to uncompress and extract the
+            distribution:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>tar zxvf <replaceable>/path/to/mysql-VERSION-OS</replaceable>.tar.gz</userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            Change location into the top-level directory of the unpacked
+            distribution:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>cd mysql-<replaceable>VERSION</replaceable></userinput>
+</programlisting>
+
+          <remark role="todo">
+            [pd] It is no longer true that you must be in the top-level
+            directory, but we need information from the build team if
+            we're to describe alternative procedures.
+          </remark>
+
+          <para>
+            Note that currently you must configure and build MySQL from
+            this top-level directory. You cannot build it in a different
+            directory.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Configure the release and compile everything:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --prefix=/usr/local/mysql</userinput>
+shell&gt; <userinput>make</userinput>
+</programlisting>
+
+          <para>
+            When you run <command>configure</command>, you might want to
+            specify other options. Run <command>./configure
+            --help</command> for a list of options.
+            <xref linkend="configure-options"/>, discusses some of the
+            more useful options.
+          </para>
+
+          <para>
+            If <command>configure</command> fails and you are going to
+            send mail to a MySQL mailing list to ask for assistance,
+            please include any lines from
+            <filename>config.log</filename> that you think can help
+            solve the problem. Also include the last couple of lines of
+            output from <command>configure</command>. To file a bug
+            report, please use the instructions in
+            <xref linkend="bug-reports"/>.
+          </para>
+
+          <para>
+            If the compile fails, see
+            <xref linkend="compilation-problems"/>, for help.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Install the distribution:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>make install</userinput>
+</programlisting>
+
+          <para>
+            You might need to run this command as
+            <literal>root</literal>.
+          </para>
+
+          <para>
+            If you want to set up an option file, use one of those
+            present in the <filename>support-files</filename> directory
+            as a template. For example:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>cp support-files/my-medium.cnf /etc/my.cnf</userinput>
+</programlisting>
+
+          <para>
+            You might need to run this command as
+            <literal>root</literal>.
+          </para>
+
+          <para>
+            If you want to configure support for
+            <literal>InnoDB</literal> tables, you should edit the
+            <literal>/etc/my.cnf</literal> file, remove the
+            <literal>#</literal> character before the option lines that
+            start with <literal>innodb_...</literal>, and modify the
+            option values to be what you want. See
+            <xref linkend="option-files"/>, and
+            <xref linkend="innodb-configuration"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Change location into the installation directory:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>cd /usr/local/mysql</userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you ran the <command>make install</command> command as
+            <literal>root</literal>, the installed files will be owned
+            by <literal>root</literal>. Ensure that the installation is
+            accessible to <literal>mysql</literal> by executing the
+            following commands as <literal>root</literal> in the
+            installation directory:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>chown -R mysql .</userinput>
+shell&gt; <userinput>chgrp -R mysql .</userinput>
+</programlisting>
+
+          <para>
+            The first command changes the owner attribute of the files
+            to the <literal>mysql</literal> user. The second changes the
+            group attribute to the <literal>mysql</literal> group.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you have not installed MySQL before, you must create the
+            MySQL data directory and initialize the grant tables:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>bin/mysql_install_db --user=mysql</userinput>
+</programlisting>
+
+          <para>
+            If you run the command as <literal>root</literal>, include
+            the <option>--user</option> option as shown. If you run the
+            command while logged in as <literal>mysql</literal>, you can
+            omit the <option>--user</option> option.
+          </para>
+
+          <para>
+            The command should create the data directory and its
+            contents with <literal>mysql</literal> as the owner.
+          </para>
+
+          <para>
+            After using <command>mysql_install_db</command> to create
+            the grant tables for MySQL, you must restart the server
+            manually. The <command>mysqld_safe</command> command to do
+            this is shown in a later step.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Most of the MySQL installation can be owned by
+            <literal>root</literal> if you like. The exception is that
+            the data directory must be owned by
+            <literal>mysql</literal>. To accomplish this, run the
+            following commands as <literal>root</literal> in the
+            installation directory:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>chown -R root .</userinput>
+shell&gt; <userinput>chown -R mysql var</userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you want MySQL to start automatically when you boot your
+            machine, you can copy
+            <filename>support-files/mysql.server</filename> to the
+            location where your system has its startup files. More
+            information can be found in the
+            <filename>support-files/mysql.server</filename> script
+            itself; see also <xref linkend="automatic-start"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
+              <primary>adding</primary>
+              <secondary>new users</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>new users</primary>
+              <secondary>adding</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>users</primary>
+              <secondary>adding</secondary>
+            </indexterm>
+
+            You can set up new accounts using the
+            <command>bin/mysql_setpermission</command> script if you
+            install the <literal>DBI</literal> and
+            <literal>DBD::mysql</literal> Perl modules. See
+            <xref linkend="mysql-setpermission"/>. For Perl module
+            installation instructions, see
+            <xref linkend="perl-support"/>.
+          </para>
+        </listitem>
+
+      </orderedlist>
+
+      <para>
+        After everything has been installed, you should test your
+        distribution. To start the MySQL server, use the following
+        command:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>/usr/local/mysql/bin/mysqld_safe --user=mysql &amp;</userinput>
+</programlisting>
+
+      <para>
+        If you run the command as <literal>root</literal>, you should
+        use the <option>--user</option> option as shown. The value of
+        the option is the name of the login account that you created in
+        the first step to use for running the server. If you run the
+        command while logged in as that user, you can omit the
+        <option>--user</option> option.
+      </para>
+
+      <para>
+        If the command fails immediately and prints <literal>mysqld
+        ended</literal>, you can find some information in the
+        <filename><replaceable>host_name</replaceable>.err</filename>
+        file in the data directory.
+      </para>
+
+      <para>
+        More information about <command>mysqld_safe</command> is given
+        in <xref linkend="mysqld-safe"/>.
+      </para>
+
+      <note>
+        <para>
+          The accounts that are listed in the MySQL grant tables
+          initially have no passwords. After starting the server, you
+          should set up passwords for them using the instructions in
+          <xref linkend="post-installation"/>.
+        </para>
+      </note>
+
+    </section>
+
+    <section id="configure-options">
+
+      <title>Typical <command>configure</command> Options</title>
+
+      <indexterm>
+        <primary>without-server option</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>with-big-tables option</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>configure script</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>options</primary>
+        <secondary>configure</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>configuration options</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>log files</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>files</primary>
+        <secondary>log</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>debugging support</primary>
+      </indexterm>
+
+      <para>
+        The <command>configure</command> script gives you a great deal
+        of control over how you configure a MySQL source distribution.
+        Typically you do this using options on the
+        <command>configure</command> command line. You can also affect
+        <command>configure</command> using certain environment
+        variables. See <xref linkend="environment-variables"/>. For a
+        full list of options supported by <command>configure</command>,
+        run this command:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --help</userinput>
+</programlisting>
+
+      <para>
+        A list of the available <command>configure</command> options is
+        provided in the table below.
+      </para>
+
+      <para condition="dynamic:buildopts:fullsummary" role="5.1:mysqld:all">
+        <citetitle>Build (<literal>configure</literal>)
+        Reference</citetitle>
+      </para>
+
+      <para>
+        Some of the <command>configure</command> options available are
+        described here. For options that may be of use if you have
+        difficulties building MySQL, see
+        <xref linkend="compilation-problems"/>.
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para id="option_configure_without-server">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>without-server option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>without-server option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            To compile just the MySQL client libraries and client
+            programs and not the server, use the
+            <option role="configure">--without-server</option> option:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --without-server</userinput>
+</programlisting>
+
+          <para>
+            If you have no C++ compiler, some client programs such as
+            <command>mysql</command> cannot be compiled because they
+            require C++.. In this case, you can remove the code in
+            <command>configure</command> that tests for the C++ compiler
+            and then run <command>./configure</command> with the
+            <option role="configure">--without-server</option> option.
+            The compile step should still try to build all clients, but
+            you can ignore any warnings about files such as
+            <filename>mysql.cc</filename>. (If <command>make</command>
+            stops, try <command>make -k</command> to tell it to continue
+            with the rest of the build even if errors occur.)
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_with-embedded-server">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-embedded-server option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>with-embedded-server option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            If you want to build the embedded MySQL library
+            (<literal>libmysqld.a</literal>), use the
+            <option role="configure">--with-embedded-server</option>
+            option.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_prefix">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>prefix option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>prefix option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>localstatedir option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>localstatedir option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            If you don't want your log files and database directories
+            located under <filename>/usr/local/var</filename>, use a
+            <command>configure</command> command something like one of
+            these:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --prefix=/usr/local/mysql</userinput>
+shell&gt; <userinput>./configure --prefix=/usr/local \</userinput>
+           <userinput>--localstatedir=/usr/local/mysql/data</userinput>
+</programlisting>
+
+          <para>
+            The first command changes the installation prefix so that
+            everything is installed under
+            <filename>/usr/local/mysql</filename> rather than the
+            default of <filename>/usr/local</filename>. The second
+            command preserves the default installation prefix, but
+            overrides the default location for database directories
+            (normally <filename>/usr/local/var</filename>) and changes
+            it to <literal>/usr/local/mysql/data</literal>.
+          </para>
+
+          <para>
+            You can also specify the installation directory and data
+            directory locations at server startup time by using the
+            <option role="mysqld">--basedir</option> and
+            <option role="mysqld">--datadir</option> options. These can
+            be given on the command line or in an MySQL option file,
+            although it is more common to use an option file. See
+            <xref linkend="option-files"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_with-tcp-port">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-tcp-port option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>with-tcp-port option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            This option specifies the port number on which the server
+            listens for TCP/IP connections. The default is port 3306. To
+            listen on a different port, use a
+            <command>configure</command> command like this:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --with-tcp-port=3307</userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_with-unix-socket-path">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-unix-socket-path option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>with-unix-socket-path option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>changing socket location</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>socket location</primary>
+              <secondary>changing</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>mysql.sock</primary>
+              <secondary>changing location of</secondary>
+            </indexterm>
+
+            If you are using Unix and you want the MySQL socket file
+            location to be somewhere other than the default location
+            (normally in the directory <filename>/tmp</filename> or
+            <filename>/var/run</filename>), use a
+            <command>configure</command> command like this:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure \</userinput>
+           <userinput>--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock</userinput>
+</programlisting>
+
+          <para>
+            The socket file name must be an absolute path name. You can
+            also change the location of <filename>mysql.sock</filename>
+            at server startup by using a MySQL option file. See
+            <xref linkend="problems-with-mysql-sock"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_with-client-ldflags">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-client-ldflags option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>with-client-ldflags option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>compiling</primary>
+              <secondary>statically</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>statically</primary>
+              <secondary>compiling</secondary>
+            </indexterm>
+
+            If you want to compile statically linked programs (for
+            example, to make a binary distribution, to get better
+            performance, or to work around problems with some Red Hat
+            Linux distributions), run <command>configure</command> like
+            this:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --with-client-ldflags=-all-static \</userinput>
+           <userinput>--with-mysqld-ldflags=-all-static</userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
+              <primary>CC environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>CC</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>CXX environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>CXX</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>gcc</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>C++ compiler</primary>
+              <secondary>gcc</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>compiler</primary>
+              <secondary>C++ gcc</secondary>
+            </indexterm>
+
+            If you are using <command>gcc</command> and don't have
+            <literal>libg++</literal> or <literal>libstdc++</literal>
+            installed, you can tell <command>configure</command> to use
+            <command>gcc</command> as your C++ compiler:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>CC=gcc CXX=gcc ./configure</userinput>
+</programlisting>
+
+          <para>
+            When you use <command>gcc</command> as your C++ compiler, it
+            does not attempt to link in <literal>libg++</literal> or
+            <literal>libstdc++</literal>. This may be a good thing to do
+            even if you have those libraries installed. Some versions of
+            them have caused strange problems for MySQL users in the
+            past.
+          </para>
+
+          <para>
+            The following list indicates some compilers and environment
+            variable settings that are commonly used with each one.
+          </para>
+
+          <indexterm>
+            <primary>CC environment variable</primary>
+          </indexterm>
+
+          <indexterm>
+            <primary>environment variable</primary>
+            <secondary>CC</secondary>
+          </indexterm>
+
+          <indexterm>
+            <primary>CXX environment variable</primary>
+          </indexterm>
+
+          <indexterm>
+            <primary>environment variable</primary>
+            <secondary>CXX</secondary>
+          </indexterm>
+
+          <indexterm>
+            <primary>CFLAGS environment variable</primary>
+          </indexterm>
+
+          <indexterm>
+            <primary>environment variable</primary>
+            <secondary>CFLAGS</secondary>
+          </indexterm>
+
+          <indexterm>
+            <primary>CXXFLAGS environment variable</primary>
+          </indexterm>
+
+          <indexterm>
+            <primary>environment variable</primary>
+            <secondary>CXXFLAGS</secondary>
+          </indexterm>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                <command>gcc</command> 2.7.2:
+              </para>
+
+<programlisting>
+CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors"
+</programlisting>
+            </listitem>
+
+            <listitem>
+              <para>
+                <command>gcc</command> 2.95.2:
+              </para>
+
+<programlisting>
+CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \
+-felide-constructors -fno-exceptions -fno-rtti"
+</programlisting>
+            </listitem>
+
+            <listitem>
+              <para>
+                <literal>pgcc</literal> 2.90.29 or newer:
+              </para>
+
+<programlisting>
+CFLAGS="-O3 -mpentiumpro -mstack-align-double" CXX=gcc \
+CXXFLAGS="-O3 -mpentiumpro -mstack-align-double \
+-felide-constructors -fno-exceptions -fno-rtti"
+</programlisting>
+            </listitem>
+
+          </itemizedlist>
+
+          <para>
+            In most cases, you can get a reasonably optimized MySQL
+            binary by using the options from the preceding list and
+            adding the following options to the
+            <command>configure</command> line:
+          </para>
+
+<programlisting>
+--prefix=/usr/local/mysql --enable-assembler \
+--with-mysqld-ldflags=-all-static
+</programlisting>
+
+          <para>
+            The full <command>configure</command> line would, in other
+            words, be something like the following for all recent
+            <command>gcc</command> versions:
+          </para>
+
+<programlisting>
+CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \
+-felide-constructors -fno-exceptions -fno-rtti" ./configure \
+--prefix=/usr/local/mysql --enable-assembler \
+--with-mysqld-ldflags=-all-static
+</programlisting>
+
+          <para>
+            The binaries we provide on the MySQL Web site at
+            <ulink url="&base-url-downloads;"/> are all compiled with
+            full optimization and should be perfect for most users. See
+            <xref linkend="mysql-binaries"/>. There are some
+            configuration settings you can tweak to build an even faster
+            binary, but these are only for advanced users. See
+            <xref linkend="compile-and-link-options"/>.
+          </para>
+
+          <para>
+            If the build fails and produces errors about your compiler
+            or linker not being able to create the shared library
+            <filename>libmysqlclient.so.<replaceable>N</replaceable></filename>
+            (where <replaceable>N</replaceable> is a version number),
+            you can work around this problem by giving the
+            <option>--disable-shared</option> option to
+            <command>configure</command>. In this case,
+            <command>configure</command> does not build a shared
+            <filename>libmysqlclient.so.<replaceable>N</replaceable></filename>
+            library.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_with-charset">
+            <indexterm>
+              <primary>character sets</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-charset option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-extra-charsets option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-collation option</secondary>
+            </indexterm>
+
+            By default, MySQL uses the <literal>latin1</literal> (cp1252
+            West European) character set. To change the default set, use
+            the <option role="configure">--with-charset</option> option:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --with-charset=<replaceable>CHARSET</replaceable></userinput>
+</programlisting>
+
+          <para>
+            <replaceable>CHARSET</replaceable> may be one of
+            <literal>binary</literal>, <literal>armscii8</literal>,
+            <literal>ascii</literal>, <literal>big5</literal>,
+            <literal>cp1250</literal>, <literal>cp1251</literal>,
+            <literal>cp1256</literal>, <literal>cp1257</literal>,
+            <literal>cp850</literal>, <literal>cp852</literal>,
+            <literal>cp866</literal>, <literal>cp932</literal>,
+            <literal>dec8</literal>, <literal>eucjpms</literal>,
+            <literal>euckr</literal>, <literal>gb2312</literal>,
+            <literal>gbk</literal>, <literal>geostd8</literal>,
+            <literal>greek</literal>, <literal>hebrew</literal>,
+            <literal>hp8</literal>, <literal>keybcs2</literal>,
+            <literal>koi8r</literal>, <literal>koi8u</literal>,
+            <literal>latin1</literal>, <literal>latin2</literal>,
+            <literal>latin5</literal>, <literal>latin7</literal>,
+            <literal>macce</literal>, <literal>macroman</literal>,
+            <literal>sjis</literal>, <literal>swe7</literal>,
+            <literal>tis620</literal>, <literal>ucs2</literal>,
+            <literal>ujis</literal>, <literal>utf8</literal>. See
+            <xref linkend="charset-configuration"/>. (Additional
+            character sets might be available. Check the output from
+            <command>./configure --help</command> for the current list.)
+          </para>
+
+          <para id="option_configure_with-collation">
+            The default collation may also be specified. MySQL uses the
+            <literal>latin1_swedish_ci</literal> collation by default.
+            To change this, use the
+            <option role="configure">--with-collation</option> option:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --with-collation=<replaceable>COLLATION</replaceable></userinput>
+</programlisting>
+
+          <para>
+            To change both the character set and the collation, use both
+            the <option role="configure">--with-charset</option> and
+            <option role="configure">--with-collation</option> options.
+            The collation must be a legal collation for the character
+            set. (Use the <literal role="stmt">SHOW COLLATION</literal>
+            statement to determine which collations are available for
+            each character set.)
+          </para>
+
+          <para id="option_configure_with-extra-charsets">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-extra-charsets option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>with-extra-charsets option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            With the <command>configure</command> option
+            <option role="configure">--with-extra-charsets=<replaceable>LIST</replaceable></option>,
+            you can define which additional character sets should be
+            compiled into the server. <replaceable>LIST</replaceable> is
+            one of the following:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                A list of character set names separated by spaces
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <literal>complex</literal> to include all character sets
+                that can't be dynamically loaded
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <literal>all</literal> to include all character sets
+                into the binaries
+              </para>
+            </listitem>
+
+          </itemizedlist>
+
+          <para>
+            Clients that want to convert characters between the server
+            and the client should use the <literal>SET NAMES</literal>
+            statement. See <xref linkend="server-session-variables"/>,
+            and <xref linkend="charset-connection"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_with-debug">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-debug option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>with-debug option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            To configure MySQL with debugging code, use the
+            <option role="configure">--with-debug</option> option:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --with-debug</userinput>
+</programlisting>
+
+          <para>
+            This causes a safe memory allocator to be included that can
+            find some errors and that provides output about what is
+            happening. See
+            <ulink url="http://forge.mysql.com/wiki/MySQL_Internals_Porting">MySQL
+            Internals: Porting</ulink>.
+          </para>
+
+          <para>
+            As of MySQL 5.1.12, using
+            <option role="configure">--with-debug</option> to configure
+            MySQL with debugging support enables you to use the
+            <option role="mysqld">--debug="d,parser_debug"</option>
+            option when you start the server. This causes the Bison
+            parser that is used to process SQL statements to dump a
+            parser trace to the server's standard error output.
+            Typically, this output is written to the error log.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_enable-thread-safe-client">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>enable-thread-safe-client option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>enable-thread-safe-client option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            If your client programs are using threads, you must compile
+            a thread-safe version of the MySQL client library with the
+            <option role="configure">--enable-thread-safe-client</option>
+            configure option. This creates a
+            <literal>libmysqlclient_r</literal> library with which you
+            should link your threaded applications. See
+            <xref linkend="threaded-clients"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_with-zlib-dir">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-zlib-dir option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>with-zlib-dir option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            Some features require that the server be built with
+            compression library support, such as the
+            <literal role="func">COMPRESS()</literal> and
+            <literal role="func">UNCOMPRESS()</literal> functions, and
+            compression of the client/server protocol. The
+            <option role="configure">--with-zlib-dir=no|bundled|<replaceable>DIR</replaceable></option>
+            option provides control over compression library support.
+            The value <literal>no</literal> explicitly disables
+            compression support. <literal>bundled</literal> causes the
+            <literal>zlib</literal> library bundled in the MySQL sources
+            to be used. A <replaceable>DIR</replaceable> path name
+            specifies the directory in which to find the compression
+            library sources.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_with-big-tables">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>with-big-tables option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>with-big-tables option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            It is possible to build MySQL with large table support using
+            the <option role="configure">--with-big-tables</option>
+            option.
+          </para>
+
+          <para>
+            This option causes the variables that store table row counts
+            to be declared as <literal>unsigned long long</literal>
+            rather than <literal>unsigned long</literal>. This enables
+            tables to hold up to approximately 1.844E+19
+            ((2<superscript>32</superscript>)<superscript>2</superscript>)
+            rows rather than 2<superscript>32</superscript> (~4.295E+09)
+            rows. Previously it was necessary to pass
+            <option>-DBIG_TABLES</option> to the compiler manually in
+            order to enable this feature.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_disable-grant-options">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>disable-grant-options option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>disable-grant-options option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            Run <command>configure</command> with the
+            <option role="configure">--disable-grant-options</option>
+            option to cause the
+            <option role="mysqld">--bootstrap</option>,
+            <option role="mysqld">--skip-grant-tables</option>, and
+            <option role="mysqld">--init-file</option> options for
+            <command>mysqld</command> to be disabled. For Windows, the
+            <command>configure.js</command> script recognizes the
+            <literal>DISABLE_GRANT_OPTIONS</literal> flag, which has the
+            same effect. The capability is available as of MySQL 5.1.15.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_enable-community-features">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>enable-community-features option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>enable-community-features option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            This option allows MySQL Community Server features to be
+            enabled. Additional options may be required for individual
+            features, such as
+            <option role="configure">--enable-profiling</option> to
+            enable statement profiling. This option was added in MySQL
+            5.1.24. It is enabled by default as of MySQL 5.1.28; to
+            disable it, use
+            <option role="configure" condition="enable-community-features">--disable-community-features</option>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_enable-profiling">
+            <indexterm>
+              <primary>configure</primary>
+              <secondary>enable-profiling option</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>enable-profiling option</primary>
+              <secondary>configure</secondary>
+            </indexterm>
+
+            When given with
+            <option role="configure">--enable-community-features</option>,
+            the <option role="configure">--enable-profiling</option>
+            option enables the statement profiling capability exposed by
+            the <literal role="stmt">SHOW PROFILE</literal> and
+            <literal role="stmt">SHOW PROFILES</literal> statements.
+            (See <xref linkend="show-profiles"/>.) This option was added
+            in MySQL 5.1.24. It is enabled by default as of MySQL
+            5.1.28; to disable it, use
+            <option role="configure" condition="enable-profiling">--disable-profiling</option>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            See <xref linkend="operating-system-specific-notes"/>, for
+            options that pertain to particular operating systems.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            See <xref linkend="secure-using-ssl"/>, for options that
+            pertain to configuring MySQL to support secure (encrypted)
+            connections.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para id="option_configure_with-plugins">
+            Several <command>configure</command> options apply to plugin
+            selection and building:
+          </para>
+
+<programlisting>
+--with-plugins=<replaceable>PLUGIN</replaceable>[,<replaceable>PLUGIN</replaceable>]...
+--with-plugins=<replaceable>GROUP</replaceable>
+--with-plugin-<replaceable>PLUGIN</replaceable>
+--without-plugin-<replaceable>PLUGIN</replaceable>
+</programlisting>
+
+          <para>
+            <replaceable>PLUGIN</replaceable> is an individual plugin
+            name such as <literal>csv</literal> or
+            <literal>archive</literal>.
+          </para>
+
+          <para>
+            As shorthand, <replaceable>GROUP</replaceable> is a
+            configuration group name such as <literal>none</literal>
+            (select no plugins) or <literal>all</literal> (select all
+            plugins).
+          </para>
+
+          <para>
+            You can build a plugin as static (compiled into the server)
+            or dynamic (built as a dynamic library that must be
+            installed using the <literal role="stmt">INSTALL
+            PLUGIN</literal> statement before it can be used). Some
+            plugins might not support static or dynamic build.
+          </para>
+
+          <para>
+            <command>configure --help</command> shows the following
+            information pertaining to plugins:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                The plugin-related options
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                The names of all available plugins
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                For each plugin, a description of its purpose, which
+                build types it supports (static or dynamic), and which
+                plugin groups it is a part of.
+              </para>
+            </listitem>
+
+          </itemizedlist>
+
+          <para>
+            <option role="configure">--with-plugins</option> can take a
+            list of one or more plugin names separated by commas, or a
+            plugin group name. The named plugins are configured to be
+            built as static plugins.
+          </para>
+
+          <para>
+            <option>--with-plugin-<replaceable>PLUGIN</replaceable></option>
+            configures the given plugin to be built as a static plugin.
+          </para>
+
+          <para>
+            <option>--without-plugin-<replaceable>PLUGIN</replaceable></option>
+            disables the given plugin from being built.
+          </para>
+
+          <para>
+            If a plugin is named both with a <option>--with</option> and
+            <option>--without</option> option, the result is undefined.
+          </para>
+
+          <para>
+            For any plugin that is not explicitly selected or disabled,
+            it is selected to be built dynamically if it supports
+            dynamic build, and not built if it does not support dynamic
+            build. (Thus, in the case that no plugin options are given,
+            all plugins that support dynamic build are selected to be
+            built as dynamic plugins. Plugins that do not support
+            dynamic build are not built.)
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+    </section>
+
+    <section id="installing-source-tree">
+
+      <title>Installing from the Development Source Tree</title>
+
+      <indexterm>
+        <primary>development source tree</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>BitKeeper tree</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>Bazaar tree</primary>
+      </indexterm>
+
+      <caution>
+        <para>
+          You should read this section only if you are interested in
+          helping us test our new code. If you just want to get MySQL up
+          and running on your system, you should use a standard release
+          distribution (either a binary or source distribution).
+        </para>
+      </caution>
+
+      <para>
+        To obtain the most recent development source tree, you must have
+        Bazaar installed. You can obtain Bazaar from the
+        <ulink url="http://bazaar-vcs.org">Bazaar VCS Website</ulink>.
+        Bazaar is supported by any platform that supports Python, and is
+        therefore compatible with any Linux, Unix, Windows or Mac OS X
+        host. Instructions for downloading and installing Bazaar on the
+        different platforms are available on the Bazaar website.
+      </para>
+
+      <para>
+        All MySQL projects are hosted on
+        <ulink url="http://launchpad.net/">Launchpad</ulink>. MySQL
+        projects, including MySQL server, MySQL Workbench, and others
+        are available from the
+        <ulink url="http://launchpad.net/~mysql">Sun/MySQL
+        Engineering</ulink> page. For the repositories related only to
+        MySQL server, see the
+        <ulink url="http://launchpad.net/mysql-server">MySQL
+        Server</ulink> page.
+      </para>
+
+      <para>
+        To build under Unix/Linux, you must have the following tools
+        installed:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            GNU <command>make</command>, available from
+            <ulink url="http://www.gnu.org/software/make/"/>. Although
+            some platforms come with their own <command>make</command>
+            implementations, it is highly recommended that you use GNU
+            <command>make</command>. It may already be available on your
+            system as <command>gmake</command>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <command>autoconf</command> 2.58 (or newer), available from
+            <ulink url="http://www.gnu.org/software/autoconf/"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <command>automake</command> 1.8.1, available from
+            <ulink url="http://www.gnu.org/software/automake/"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <command>libtool</command> 1.5, available from
+            <ulink url="http://www.gnu.org/software/libtool/"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <command>m4</command>, available from
+            <ulink url="http://www.gnu.org/software/m4/"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <command>bison</command>, available from
+            <ulink url="http://www.gnu.org/software/bison/"/>. You
+            should use the latest version of bison where possible.
+            Version 1.75 and version 2.1 are known to work. There have
+            been reported problems with <command>bison</command> 1.875.
+            If you experience problems, upgrade to a later, rather than
+            earlier, version. Versions of <command>bison</command> older
+            than 1.75 may report this error:
+          </para>
+
+<programlisting>
+sql_yacc.yy:#####: fatal error: maximum table size (32767) exceeded
+</programlisting>
+
+          <para>
+            The maximum table size is not actually exceeded; the error
+            is caused by bugs in older versions of
+            <command>bison</command>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        To build under Windows you must have Microsoft Visual C++ 2005
+        Express Edition, Visual Studio .Net 2003 (7.1), or Visual Studio
+        2005 (8.0) compiler system.
+      </para>
+
+      <para>
+        Once the necessary tools are installed, you must create a local
+        branch of the MySQL source code on your machine:
+      </para>
+
+      <orderedlist>
+
+        <listitem>
+          <para>
+            To obtain a copy of the MySQL source code, you must create a
+            new Bazaar branch. If you do not already have a Bazaar
+            repository directory set up, you need to initialize a new
+            directory:
+          </para>
+
+<programlisting>shell&gt; <userinput>mkdir mysql-server</userinput>
+shell&gt; <userinput>bzr init-repo --trees mysql-server</userinput></programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            Once you have an initialized directory, you can
+            <literal>branch</literal> from the public MySQL server
+            repositories to create a local source tree. To create a
+            branch of a specific version:
+          </para>
+
+<programlisting>shell&gt; <userinput>cd mysql-server</userinput>
+shell&gt; <userinput>bzr branch lp:mysql-server/&current-series; mysql-&current-series;</userinput></programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            The initial download will take some time to complete,
+            depending on the speed of your connection. Please be
+            patient. Once you have downloaded the first tree, additional
+            trees should take significantly less time to download.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            When building from the Bazaar branch, you may want to create
+            a copy of your active branch so that you can make
+            configuration and other changes without affecting the
+            original branch contents. You can achieve this by branching
+            from the original branch:
+          </para>
+
+<programlisting>shell&gt; <userinput>bzr branch mysql-&current-series; mysql-&current-series;-build</userinput></programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            To obtain changes made after you have set up the branch
+            initially, update it using the <literal>pull</literal>
+            option periodically. Use this command in the top-level
+            directory of the local copy:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>bzr pull</userinput>
+</programlisting>
+
+          <para>
+            You can examine the changeset comments for the tree by using
+            the <literal>log</literal> option to <command>bzr</command>:
+          </para>
+
+<programlisting>shell&gt; bzr log</programlisting>
+
+          <para>
+            You can also browse changesets, comments, and source code
+            online. To browse this information for MySQL
+            &current-series;, go to the Launchpad
+            <ulink url="http://launchpad.net/mysql-server">MySQL
+            Server</ulink> page.
+          </para>
+
+          <para>
+            If you see diffs (changes) or code that you have a question
+            about, do not hesitate to send email to the MySQL
+            <literal>internals</literal> mailing list. See
+            <xref linkend="mailing-lists"/>. Also, if you think you have
+            a better idea on how to do something, send an email message
+            to the list with a patch.
+          </para>
+        </listitem>
+
+      </orderedlist>
+
+      <para>
+        After you have the local branch, you can build MySQL server from
+        the source code. On Windows, the build process is different from
+        Unix/Linux: see <xref linkend="windows-source-build"/>.
+      </para>
+
+      <para>
+        On Unix/Linux, use the <command>autoconf</command> system to
+        create the <command>configure</command> script so that you can
+        configure the build environment before building. The following
+        example shows the typical commands required to build MySQL from
+        a source tree.
+      </para>
+
+      <orderedlist>
+
+        <listitem>
+          <para>
+            Change location to the top-level directory of the source
+            tree; replace <filename>mysql-&current-series;</filename>
+            with the appropriate directory name.
+          </para>
+
+<programlisting>
+shell&gt; <userinput>cd mysql-&current-series;</userinput>
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            Prepare the source tree for configuration.
+          </para>
+
+          <para>
+            Prior to MySQL 5.1.12, you must separately configure the
+            <literal>InnoDB</literal> storage engine. Run the following
+            command from the main source directory:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>(cd storage/innobase; autoreconf --force --install)</userinput>
+</programlisting>
+
+          <para>
+            You can omit the previous command for MySQL 5.1.12 and
+            later, or if you do not require <literal>InnoDB</literal>
+            support.
+          </para>
+
+          <para>
+            Prepare the remainder of the source tree:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>autoreconf --force --install</userinput>
+</programlisting>
+
+          <para>
+            As an alternative to the preceding
+            <command>autoreconf</command> command, you can use
+            <command>BUILD/autorun.sh</command>, which acts as a
+            shortcut for the following sequence of commands:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>aclocal; autoheader</userinput>
+shell&gt; <userinput>libtoolize --automake --force</userinput>
+shell&gt; <userinput>automake --force --add-missing; autoconf</userinput>
+</programlisting>
+
+          <para>
+            If you get some strange errors during this stage, verify
+            that you have the correct version of
+            <command>libtool</command> installed.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Configure the source tree and compile MySQL:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure  # Add your favorite options here</userinput>
+shell&gt; <userinput>make</userinput>
+</programlisting>
+
+          <para>
+            For a description of some <command>configure</command>
+            options, see <xref linkend="configure-options"/>.
+          </para>
+
+          <para>
+            A collection of our standard configuration scripts is
+            located in the <filename>BUILD/</filename> subdirectory. For
+            example, you may find it more convenient to use the
+            <filename>BUILD/compile-pentium-debug</filename> script than
+            the preceding set of shell commands. To compile on a
+            different architecture, modify the script by removing flags
+            that are Pentium-specific, or use another script that may be
+            more appropriate. These scripts are provided on an
+            <quote>as-is</quote> basis. They are not officially
+            maintained and their contents may change from release to
+            release.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            When the build is done, run <command>make install</command>.
+            Be careful with this on a production machine; the command
+            may overwrite your live release installation. If you already
+            have MySQL installed and do not want to overwrite it, run
+            <command>./configure</command> with values for the
+            <option role="configure">--prefix</option>,
+            <option role="configure">--with-tcp-port</option>, and
+            <option role="configure">--with-unix-socket-path</option>
+            options different from those used for your production
+            server.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Play hard with your new installation and try to make the new
+            features crash. Start by running <command>make
+            test</command>. See <xref linkend="mysql-test-suite"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you have gotten to the <command>make</command> stage, but
+            the distribution does not compile, please enter the problem
+            into our bugs database using the instructions given in
+            <xref linkend="bug-reports"/>. If you have installed the
+            latest versions of the required GNU tools, and they crash
+            trying to process our configuration files, please report
+            that also. However, if you get a <literal>command not
+            found</literal> error or a similar problem for
+            <command>aclocal</command>, <command>configure</command>, or
+            other required tools, do not report it. Instead, make sure
+            that all the required tools are installed and that your
+            <literal>PATH</literal> variable is set correctly so that
+            your shell can find them.
+          </para>
+        </listitem>
+
+      </orderedlist>
+
+    </section>
+
+    <section id="compilation-problems">
+
+      <title>Dealing with Problems Compiling MySQL</title>
+
+      <indexterm>
+        <primary>compiling</primary>
+        <secondary>problems</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>problems</primary>
+        <secondary>compiling</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>reconfiguring</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>config.cache file</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>files</primary>
+        <secondary>config.cache</secondary>
+      </indexterm>
+
+      <para>
+        All MySQL programs compile cleanly for us with no warnings on
+        Solaris or Linux using <command>gcc</command>. On other systems,
+        warnings may occur due to differences in system include files.
+        See <xref linkend="mit-pthreads"/>, for warnings that may occur
+        when using MIT-pthreads. For other problems, check the following
+        list.
+      </para>
+
+      <para>
+        The solution to many problems involves reconfiguring. If you do
+        need to reconfigure, take note of the following:
+      </para>
+
+      <indexterm>
+        <primary>running configure after prior invocation</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>configure</primary>
+        <secondary>running after prior invocation</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>reconfiguring</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>config.cache</primary>
+      </indexterm>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            If <command>configure</command> is run after it has
+            previously been run, it may use information that was
+            gathered during its previous invocation. This information is
+            stored in <filename>config.cache</filename>. When
+            <command>configure</command> starts up, it looks for that
+            file and reads its contents if it exists, on the assumption
+            that the information is still correct. That assumption is
+            invalid when you reconfigure.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Each time you run <command>configure</command>, you must run
+            <command>make</command> again to recompile. However, you may
+            want to remove old object files from previous builds first
+            because they were compiled using different configuration
+            options.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        To prevent old configuration information or object files from
+        being used, run these commands before re-running
+        <command>configure</command>:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>rm config.cache</userinput>
+shell&gt; <userinput>make clean</userinput>
+</programlisting>
+
+      <para>
+        Alternatively, you can run <command>make distclean</command>.
+      </para>
+
+      <para>
+        The following list describes some of the problems when compiling
+        MySQL that have been found to occur most often:
+      </para>
+
+      <itemizedlist>
+
+        <indexterm>
+          <primary>cc1plus problems</primary>
+        </indexterm>
+
+        <indexterm>
+          <primary>fatal signal 11</primary>
+        </indexterm>
+
+        <indexterm>
+          <primary>sql_yacc.cc problems</primary>
+        </indexterm>
+
+        <indexterm>
+          <primary>internal compiler errors</primary>
+        </indexterm>
+
+        <indexterm>
+          <primary>virtual memory</primary>
+          <secondary>problems while compiling</secondary>
+        </indexterm>
+
+        <indexterm>
+          <primary>configure option</primary>
+          <secondary>--with-low-memory</secondary>
+        </indexterm>
+
+        <listitem>
+          <para id="option_configure_with-low-memory">
+            If you get errors such as the ones shown here when compiling
+            <filename>sql_yacc.cc</filename>, you probably have run out
+            of memory or swap space:
+          </para>
+
+<programlisting>
+Internal compiler error: program cc1plus got fatal signal 11
+Out of virtual memory
+Virtual memory exhausted
+</programlisting>
+
+          <para>
+            The problem is that <command>gcc</command> requires a huge
+            amount of memory to compile <filename>sql_yacc.cc</filename>
+            with inline functions. Try running
+            <command>configure</command> with the
+            <option role="configure">--with-low-memory</option> option:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --with-low-memory</userinput>
+</programlisting>
+
+          <para>
+            This option causes <option>-fno-inline</option> to be added
+            to the compile line if you are using <command>gcc</command>
+            and <option>-O0</option> if you are using something else.
+            You should try the
+            <option role="configure">--with-low-memory</option> option
+            even if you have so much memory and swap space that you
+            think you can't possibly have run out. This problem has been
+            observed to occur even on systems with generous hardware
+            configurations, and the
+            <option role="configure">--with-low-memory</option> option
+            usually fixes it.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            By default, <command>configure</command> picks
+            <command>c++</command> as the compiler name and GNU
+            <command>c++</command> links with <option>-lg++</option>. If
+            you are using <command>gcc</command>, that behavior can
+            cause problems during configuration such as this:
+          </para>
+
+          <indexterm>
+            <primary>C++ compiler cannot create executables</primary>
+          </indexterm>
+
+<programlisting>
+configure: error: installation or configuration problem:
+C++ compiler cannot create executables.
+</programlisting>
+
+          <indexterm>
+            <primary>CXX environment variable</primary>
+          </indexterm>
+
+          <indexterm>
+            <primary>environment variable</primary>
+            <secondary>CXX</secondary>
+          </indexterm>
+
+          <para>
+            You might also observe problems during compilation related
+            to <command>g++</command>, <literal>libg++</literal>, or
+            <literal>libstdc++</literal>.
+          </para>
+
+          <para>
+            One cause of these problems is that you may not have
+            <command>g++</command>, or you may have
+            <command>g++</command> but not <literal>libg++</literal>, or
+            <literal>libstdc++</literal>. Take a look at the
+            <filename>config.log</filename> file. It should contain the
+            exact reason why your C++ compiler didn't work. To work
+            around these problems, you can use <command>gcc</command> as
+            your C++ compiler. Try setting the environment variable
+            <literal>CXX</literal> to <literal>"gcc -O3"</literal>. For
+            example:
+          </para>
+
+          <indexterm>
+            <primary>CXX environment variable</primary>
+          </indexterm>
+
+          <indexterm>
+            <primary>environment variables</primary>
+            <secondary>CXX</secondary>
+          </indexterm>
+
+<programlisting>
+shell&gt; <userinput>CXX="gcc -O3" ./configure</userinput>
+</programlisting>
+
+          <para>
+            This works because <command>gcc</command> compiles C++
+            source files as well as <command>g++</command> does, but
+            does not link in <literal>libg++</literal> or
+            <literal>libstdc++</literal> by default.
+          </para>
+
+          <para>
+            Another way to fix these problems is to install
+            <command>g++</command>, <literal>libg++</literal>, and
+            <literal>libstdc++</literal>. However, do not use
+            <literal>libg++</literal> or <literal>libstdc++</literal>
+            with MySQL because this only increases the binary size of
+            <command>mysqld</command> without providing any benefits.
+            Some versions of these libraries have also caused strange
+            problems for MySQL users in the past.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If your compile fails with errors such as any of the
+            following, you must upgrade your version of
+            <command>make</command> to GNU <command>make</command>:
+          </para>
+
+<programlisting>
+making all in mit-pthreads
+make: Fatal error in reader: Makefile, line 18:
+Badly formed macro assignment
+</programlisting>
+
+          <para>
+            Or:
+          </para>
+
+<programlisting>
+make: file `Makefile' line 18: Must be a separator (:
+</programlisting>
+
+          <para>
+            Or:
+          </para>
+
+<programlisting>
+pthread.h: No such file or directory
+</programlisting>
+
+          <indexterm>
+            <primary>Solaris troubleshooting</primary>
+          </indexterm>
+
+          <indexterm>
+            <primary>FreeBSD troubleshooting</primary>
+          </indexterm>
+
+          <indexterm>
+            <primary>troubleshooting</primary>
+            <secondary>Solaris</secondary>
+          </indexterm>
+
+          <indexterm>
+            <primary>troubleshooting</primary>
+            <secondary>FreeBSD</secondary>
+          </indexterm>
+
+          <para>
+            Solaris and FreeBSD are known to have troublesome
+            <command>make</command> programs.
+          </para>
+
+          <para>
+            GNU <command>make</command> 3.75 is known to work.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
+              <primary>CC environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>CC</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>CXX environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>CXX</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>CFLAGS environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>CFLAGS</secondary>
+            </indexterm>
+
+            <indexterm>
+              <primary>CXXFLAGS environment variable</primary>
+            </indexterm>
+
+            <indexterm>
+              <primary>environment variable</primary>
+              <secondary>CXXFLAGS</secondary>
+            </indexterm>
+
+            If you want to define flags to be used by your C or C++
+            compilers, do so by adding the flags to the
+            <literal>CFLAGS</literal> and <literal>CXXFLAGS</literal>
+            environment variables. You can also specify the compiler
+            names this way using <literal>CC</literal> and
+            <literal>CXX</literal>. For example:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>CC=gcc</userinput>
+shell&gt; <userinput>CFLAGS=-O3</userinput>
+shell&gt; <userinput>CXX=gcc</userinput>
+shell&gt; <userinput>CXXFLAGS=-O3</userinput>
+shell&gt; <userinput>export CC CFLAGS CXX CXXFLAGS</userinput>
+</programlisting>
+
+          <para>
+            See <xref linkend="mysql-binaries"/>, for a list of flag
+            definitions that have been found to be useful on various
+            systems.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you get errors such as those shown here when compiling
+            <command>mysqld</command>, <command>configure</command> did
+            not correctly detect the type of the last argument to
+            <literal>accept()</literal>,
+            <literal>getsockname()</literal>, or
+            <literal>getpeername()</literal>:
+          </para>
+
+<programlisting>
+cxx: Error: mysqld.cc, line 645: In this statement, the referenced
+     type of the pointer value ''length'' is ''unsigned long'',
+     which is not compatible with ''int''.
+new_sock = accept(sock, (struct sockaddr *)&amp;cAddr, &amp;length);
+</programlisting>
+
+          <para>
+            To fix this, edit the <filename>config.h</filename> file
+            (which is generated by <command>configure</command>). Look
+            for these lines:
+          </para>
+
+<programlisting>
+/* Define as the base type of the last arg to accept */
+#define SOCKET_SIZE_TYPE XXX
+</programlisting>
+
+          <para>
+            Change <literal>XXX</literal> to <literal>size_t</literal>
+            or <literal>int</literal>, depending on your operating
+            system. (You must do this each time you run
+            <command>configure</command> because
+            <command>configure</command> regenerates
+            <filename>config.h</filename>.)
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            The <filename>sql_yacc.cc</filename> file is generated from
+            <filename>sql_yacc.yy</filename>. Normally, the build
+            process does not need to create
+            <filename>sql_yacc.cc</filename> because MySQL comes with a
+            pre-generated copy. However, if you do need to re-create it,
+            you might encounter this error:
+          </para>
+
+<programlisting>
+"sql_yacc.yy", line <replaceable>xxx</replaceable> fatal: default action causes potential...
+</programlisting>
+
+          <para>
+            This is a sign that your version of <command>yacc</command>
+            is deficient. You probably need to install
+            <command>bison</command> (the GNU version of
+            <command>yacc</command>) and use that instead.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            On Debian Linux 3.0, you need to install
+            <literal>gawk</literal> instead of the default
+            <literal>mawk</literal>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you need to debug <command>mysqld</command> or a MySQL
+            client, run <command>configure</command> with the
+            <option role="configure">--with-debug</option> option, and
+            then recompile and link your clients with the new client
+            library. See
+            <ulink url="http://forge.mysql.com/wiki/MySQL_Internals_Porting">MySQL
+            Internals: Porting</ulink>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you get a compilation error on Linux (for example, SuSE
+            Linux 8.1 or Red Hat Linux 7.3) similar to the following
+            one, you probably do not have <command>g++</command>
+            installed:
+          </para>
+
+<programlisting>
+libmysql.c:1329: warning: passing arg 5 of `gethostbyname_r' from
+incompatible pointer type
+libmysql.c:1329: too few arguments to function `gethostbyname_r'
+libmysql.c:1329: warning: assignment makes pointer from integer
+without a cast
+make[2]: *** [libmysql.lo] Error 1
+</programlisting>
+
+          <para>
+            By default, the <command>configure</command> script attempts
+            to determine the correct number of arguments by using
+            <command>g++</command> (the GNU C++ compiler). This test
+            yields incorrect results if <command>g++</command> is not
+            installed. There are two ways to work around this problem:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                Make sure that the GNU C++ <command>g++</command> is
+                installed. On some Linux distributions, the required
+                package is called <literal>gpp</literal>; on others, it
+                is named <command>gcc-c++</command>.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Use <command>gcc</command> as your C++ compiler by
+                setting the <literal>CXX</literal> environment variable
+                to <command>gcc</command>:
+              </para>
+
+<programlisting>
+export CXX="gcc"
+</programlisting>
+            </listitem>
+
+          </itemizedlist>
+
+          <para>
+            You must run <command>configure</command> again after making
+            either of those changes.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+    </section>
+
+    <section id="mit-pthreads">
+
+      <title>MIT-pthreads Notes</title>
+
+      <indexterm>
+        <primary>MIT-pthreads</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>thread support</primary>
+        <secondary>nonnative</secondary>
+      </indexterm>
+
+      <para>
+        This section describes some of the issues involved in using
+        MIT-pthreads.
+      </para>
+
+      <para>
+        On Linux, you should <emphasis>not</emphasis> use MIT-pthreads.
+        Use the installed LinuxThreads implementation instead. See
+        <xref linkend="linux"/>.
+      </para>
+
+      <para>
+        If your system does not provide native thread support, you
+        should build MySQL using the MIT-pthreads package. This includes
+        older FreeBSD systems, SunOS 4.x, Solaris 2.4 and earlier, and
+        some others. See <xref linkend="which-os"/>.
+      </para>
+
+      <para>
+        MIT-pthreads is not part of the MySQL &current-series; source
+        distribution. If you require this package, you need to download
+        it separately from
+        <ulink url="http://dev.mysql.com/Downloads/Contrib/pthreads-1_60_beta6-mysql.tar.gz"/>
+      </para>
+
+      <para>
+        After downloading, extract this source archive into the top
+        level of the MySQL source directory. It creates a new
+        subdirectory named <literal>mit-pthreads</literal>.
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            On most systems, you can force MIT-pthreads to be used by
+            running <command>configure</command> with the
+            <option>--with-mit-threads</option> option:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>./configure --with-mit-threads</userinput>
+</programlisting>
+
+          <para>
+            Building in a nonsource directory is not supported when
+            using MIT-pthreads because we want to minimize our changes
+            to this code.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            The checks that determine whether to use MIT-pthreads occur
+            only during the part of the configuration process that deals
+            with the server code. If you have configured the
+            distribution using
+            <option role="configure">--without-server</option> to build
+            only the client code, clients do not know whether
+            MIT-pthreads is being used and use Unix socket file
+            connections by default. Because Unix socket files do not
+            work under MIT-pthreads on some platforms, this means you
+            need to use <option>-h</option> or <option>--host</option>
+            with a value other than <literal>localhost</literal> when
+            you run client programs.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            When MySQL is compiled using MIT-pthreads, system locking is
+            disabled by default for performance reasons. You can tell
+            the server to use system locking with the
+            <option role="mysqld">--external-locking</option> option.
+            This is needed only if you want to be able to run two MySQL
+            servers against the same data files, but that is not
+            recommended, anyway.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Sometimes the pthread <literal>bind()</literal> command
+            fails to bind to a socket without any error message (at
+            least on Solaris). The result is that all connections to the
+            server fail. For example:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>mysqladmin version</userinput>
+mysqladmin: connect to server at '' failed;
+error: 'Can't connect to mysql server on localhost (146)'
+</programlisting>
+
+          <para>
+            The solution to this problem is to kill the
+            <command>mysqld</command> server and restart it. This has
+            happened to us only when we have forcibly stopped the server
+            and restarted it immediately.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            With MIT-pthreads, the <literal>sleep()</literal> system
+            call isn't interruptible with <literal>SIGINT</literal>
+            (break). This is noticeable only when you run
+            <command>mysqladmin --sleep</command>. You must wait for the
+            <literal>sleep()</literal> call to terminate before the
+            interrupt is served and the process stops.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            When linking, you might receive warning messages like these
+            (at least on Solaris); they can be ignored:
+          </para>
+
+<programlisting>
+ld: warning: symbol `_iob' has differing sizes:
+    (file /my/local/pthreads/lib/libpthread.a(findfp.o) value=0x4;
+file /usr/lib/libc.so value=0x140);
+    /my/local/pthreads/lib/libpthread.a(findfp.o) definition taken
+ld: warning: symbol `__iob' has differing sizes:
+    (file /my/local/pthreads/lib/libpthread.a(findfp.o) value=0x4;
+file /usr/lib/libc.so value=0x140);
+    /my/local/pthreads/lib/libpthread.a(findfp.o) definition taken
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            Some other warnings also can be ignored:
+          </para>
+
+<programlisting>
+implicit declaration of function `int strtoll(...)'
+implicit declaration of function `int strtoul(...)'
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            We have not been able to make <literal>readline</literal>
+            work with MIT-pthreads. (This is not necessary, but may be
+            of interest to some.)
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+    </section>
+
+    <section id="windows-source-build">
+
+      <title>Installing MySQL from Source on Windows</title>
+
+      <para>
+        These instructions describe how to build binaries from source
+        for MySQL &current-series; on Windows. Instructions are provided
+        for building binaries from a standard source distribution or
+        from the Bazaar tree that contains the latest development
+        source.
+      </para>
+
+      <note>
+        <para>
+          The instructions here are strictly for users who want to test
+          MySQL on Microsoft Windows from the latest source distribution
+          or from the Bazaar tree. For production use, we do not advise
+          using a MySQL server built by yourself from source. Normally,
+          it is best to use precompiled binary distributions of MySQL
+          that are built specifically for optimal performance on Windows
+          by Sun Microsystems, Inc. Instructions for installing binary
+          distributions are available in
+          <xref linkend="windows-installation"/>.
+        </para>
+      </note>
+
+      <para>
+        To build MySQL on Windows from source, you must satisfy the
+        following system, compiler, and resource requirements:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Windows 2000, Windows XP, or newer version.
+          </para>
+
+          <para>
+            Windows Vista is supported when using Visual Studio 2005
+            provided you have installed the following updates:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                <ulink url="http://support.microsoft.com/?kbid=926601">Microsoft
+                Visual Studio 2005 Professional Edition - ENU Service
+                Pack 1 (KB926601)</ulink>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <ulink url="http://support.microsoft.com/?kbid=937061">Security
+                Update for Microsoft Visual Studio 2005 Professional
+                Edition - ENU (KB937061)</ulink>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <ulink url="http://support.microsoft.com/?kbid=932232">Update
+                for Microsoft Visual Studio 2005 Professional Edition -
+                ENU (KB932232)</ulink>
+              </para>
+            </listitem>
+
+          </itemizedlist>
+        </listitem>
+
+        <listitem>
+          <para>
+            CMake, which can be downloaded from
+            <ulink url="http://www.cmake.org"/>. After installing,
+            modify your path to include the <literal>cmake</literal>
+            binary.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Microsoft Visual C++ 2005 Express Edition, Visual Studio
+            .Net 2003 (7.1), or Visual Studio 2005 (8.0) compiler
+            system.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you are using Visual C++ 2005 Express Edition, you must
+            also install an appropriate Platform SDK. More information
+            and links to downloads for various Windows platforms is
+            available from
+            <ulink url="http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35-c656-4969-ace8-e4c0c0716adb"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you are compiling from a Bazaar tree or making changes to
+            the parser, you need <literal>bison</literal> for Windows,
+            which can be downloaded from
+            <ulink url="http://gnuwin32.sourceforge.net/packages/bison.htm"/>.
+            Download the package labeled <quote>Complete package,
+            excluding sources</quote>. After installing the package,
+            modify your path to include the <command>bison</command>
+            binary and ensure that this binary is accessible from Visual
+            Studio.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Cygwin might be necessary if you want to run the test script
+            or package the compiled binaries and support files into a
+            Zip archive. (Cygwin is needed only to test or package the
+            distribution, not to build it.) Cygwin is available from
+            <ulink url="http://cygwin.com"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            3GB to 5GB of disk space.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        The exact system requirements can be found here:
+        <ulink url="http://msdn.microsoft.com/vstudio/Previous/2003/sysreqs/default.aspx"/>
+        and
+        <ulink url="http://msdn.microsoft.com/vstudio/products/sysreqs/default.aspx"/>
+      </para>
+
+      <para>
+        You also need a MySQL source distribution for Windows, which can
+        be obtained two ways:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Obtain a source distribution packaged by Sun Microsystems,
+            Inc. These are available from
+            <ulink url="&base-url-downloads;"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Package a source distribution yourself from the latest
+            Bazaar developer source tree. For instructions on pulling
+            the latest source files, see
+            <xref linkend="installing-source-tree"/>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        If you find something not working as expected, or you have
+        suggestions about ways to improve the current build process on
+        Windows, please send a message to the <literal>win32</literal>
+        mailing list. See <xref linkend="mailing-lists"/>.
+      </para>
+
+      <section id="windows-source-build-cmake">
+
+        <title>Building MySQL from Source Using CMake and Visual Studio</title>
+
+        <indexterm>
+          <primary>CMake</primary>
+        </indexterm>
+
+        <indexterm>
+          <primary>Visual Studio</primary>
+        </indexterm>
+
+        <para>
+          You can build MySQL on Windows by using a combination of
+          <command>cmake</command> and Microsoft Visual Studio .NET 2003
+          (7.1), Microsoft Visual Studio 2005 (8.0) or Microsoft Visual
+          C++ 2005 Express Edition. You must have the appropriate
+          Microsoft Platform SDK installed.
+        </para>
+
+        <note>
+          <para>
+            To compile from the source code on Windows you must use the
+            standard source distribution (for example,
+            <filename>mysql-&current-version;.tar.gz</filename>). You
+            build from the same distribution as used to build MySQL on
+            Unix, Linux and other platforms. Do <emphasis>not</emphasis>
+            use the Windows Source distributions as they do not contain
+            the necessary configuration script and other files.
+          </para>
+        </note>
+
+        <para>
+          Follow this procedure to build MySQL:
+        </para>
+
+        <orderedlist>
+
+          <listitem>
+            <para>
+              If you are installing from a packaged source distribution,
+              create a work directory (for example,
+              <filename>C:\workdir</filename>), and unpack the source
+              distribution there using <command>WinZip</command> or
+              another Windows tool that can read
+              <filename>.zip</filename> files. This directory is the
+              work directory in the following instructions.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Using a command shell, navigate to the work directory and
+              run the following command:
+            </para>
+
+<programlisting>
+C:\workdir&gt;<userinput>win\configure.js <replaceable>options</replaceable></userinput>
+</programlisting>
+
+            <para>
+              If you have associated the <filename>.js</filename> file
+              extension with an application such as a text editor, then
+              you may need to use the following command to force
+              <filename>configure.js</filename> to be executed as a
+              script:
+            </para>
+
+<programlisting>
+C:\workdir&gt;<userinput>cscript win\configure.js <replaceable>options</replaceable></userinput>
+</programlisting>
+
+            <para>
+              These options are available for
+              <filename>configure.js</filename>:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  <literal>WITH_INNOBASE_STORAGE_ENGINE</literal>:
+                  Enable the <literal>InnoDB</literal> storage engine.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>WITH_PARTITION_STORAGE_ENGINE</literal>:
+                  Enable user-defined partitioning.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>WITH_ARCHIVE_STORAGE_ENGINE</literal>: Enable
+                  the <literal>ARCHIVE</literal> storage engine.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>WITH_BLACKHOLE_STORAGE_ENGINE</literal>:
+                  Enable the <literal>BLACKHOLE</literal> storage
+                  engine.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>WITH_EXAMPLE_STORAGE_ENGINE</literal>: Enable
+                  the <literal>EXAMPLE</literal> storage engine.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>WITH_FEDERATED_STORAGE_ENGINE</literal>:
+                  Enable the <literal>FEDERATED</literal> storage
+                  engine.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>WITH_NDBCLUSTER_STORAGE_ENGINE</literal>
+                  (<emphasis>experimental</emphasis>): Enable the
+                  <literal>NDBCLUSTER</literal> storage engine in the
+                  MySQL server; cause binaries for the MySQL Cluster
+                  management and data node, management client, and other
+                  programs to be built.
+                </para>
+
+                <para>
+                  This option is supported only in MySQL Cluster NDB 7.0
+                  (<literal role="se">NDBCLUSTER</literal> storage
+                  engine versions 6.4.0 and later) using the MySQL
+                  Cluster sources. It cannot be used to enable
+                  clustering support in other MySQL source trees or
+                  distributions.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>MYSQL_SERVER_SUFFIX=<replaceable>suffix</replaceable></literal>:
+                  Server suffix, default none.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>COMPILATION_COMMENT=<replaceable>comment</replaceable></literal>:
+                  Server comment, default "Source distribution".
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>MYSQL_TCP_PORT=<replaceable>port</replaceable></literal>:
+                  Server port, default 3306.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal>DISABLE_GRANT_OPTIONS</literal>: Disables the
+                  <option role="mysqld">--bootstrap</option>,
+                  <option role="mysqld">--skip-grant-tables</option>,
+                  and <option role="mysqld">--init-file</option> options
+                  for <command>mysqld</command>. This option is
+                  available as of MySQL 5.1.15.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+
+            <para>
+              For example (type the command on one line):
+            </para>
+
+<programlisting>
+C:\workdir&gt;<userinput>win\configure.js WITH_INNOBASE_STORAGE_ENGINE</userinput>
+             <userinput>WITH_PARTITION_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-pro</userinput>
+</programlisting>
+          </listitem>
+
+          <listitem>
+            <para>
+              From the work directory, execute the
+              <filename>win\build-vs8.bat</filename> or
+              <filename>win\build-vs71.bat</filename> file, depending on
+              the version of Visual Studio you have installed. The
+              script invokes CMake, which generates the
+              <filename>mysql.sln</filename> solution file.
+            </para>
+
+            <para>
+              You can also use
+              <filename>win\build-vs8_x64.bat</filename> to build the
+              64-bit version of MySQL. However, you cannot build the
+              64-bit version with Visual Studio Express Edition. You
+              must use Visual Studio 2005 (8.0) or higher.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              From the work directory, open the generated
+              <filename>mysql.sln</filename> file with Visual Studio and
+              select the proper configuration using the
+              <guimenu>Configuration</guimenu> menu. The menu provides
+              <guimenuitem>Debug</guimenuitem>,
+              <guimenuitem>Release</guimenuitem>,
+              <guimenuitem>RelwithDebInfo</guimenuitem>,
+              <guimenuitem>MinRelInfo</guimenuitem> options. Then select
+              <guimenu>Solution</guimenu> &gt;
+              <guimenuitem>Build</guimenuitem> to build the solution.
+            </para>
+
+            <para>
+              Remember the configuration that you use in this step. It
+              is important later when you run the test script because
+              that script needs to know which configuration you used.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Test the server. The server built using the preceding
+              instructions expects that the MySQL base directory and
+              data directory are <filename>C:\mysql</filename> and
+              <filename>C:\mysql\data</filename> by default. If you want
+              to test your server using the source tree root directory
+              and its data directory as the base directory and data
+              directory, you need to tell the server their path names.
+              You can either do this on the command line with the
+              <option role="mysqld">--basedir</option> and
+              <option role="mysqld">--datadir</option> options, or by
+              placing appropriate options in an option file. (See
+              <xref linkend="option-files"/>.) If you have an existing
+              data directory elsewhere that you want to use, you can
+              specify its path name instead.
+            </para>
+
+            <para>
+              When the server is running in standalone fashion or as a
+              service based on your configuration, try to connect to it
+              from the <command>mysql</command> interactive command-line
+              utility.
+            </para>
+
+            <para>
+              You can also run the standard test script,
+              <command>mysql-test-run.pl</command>. This script is
+              written in Perl, so you'll need either Cygwin or
+              ActiveState Perl to run it. You may also need to install
+              the modules required by the script. To run the test
+              script, change location into the
+              <filename>mysql-test</filename> directory under the work
+              directory, set the <literal>MTR_VS_CONFIG</literal>
+              environment variable to the configuration you selected
+              earlier (or use the <literal>--vs-config</literal>
+              option), and invoke <command>mysql-test-run.pl</command>.
+              For example (using Cygwin and the <command>bash</command>
+              shell):
+            </para>
+
+<programlisting>
+shell&gt; <literal>cd mysql-test</literal>
+shell&gt; <literal>export MTR_VS_CONFIG=debug</literal>
+shell&gt; <literal>./mysql-test-run.pl --force --timer</literal>
+shell&gt; <literal>./mysql-test-run.pl --force --timer --ps-protocol</literal>
+</programlisting>
+          </listitem>
+
+        </orderedlist>
+
+        <para>
+          When you are satisfied that the programs you have built are
+          working correctly, stop the server. Now you can install the
+          distribution. One way to do this is to use the
+          <command>make_win_bin_dist</command> script in the
+          <filename>scripts</filename> directory of the MySQL source
+          distribution (see <xref linkend="make-win-bin-dist"/>). This
+          is a shell script, so you must have Cygwin installed if you
+          want to use it. It creates a Zip archive of the built
+          executables and support files that you can unpack in the
+          location at which you want to install MySQL.
+        </para>
+
+        <para>
+          It is also possible to install MySQL by copying directories
+          and files directly:
+        </para>
+
+        <orderedlist>
+
+          <listitem>
+            <para>
+              Create the directories where you want to install MySQL.
+              For example, to install into
+              <filename>C:\mysql</filename>, use these commands:
+            </para>
+
+<programlisting>
+C:\&gt; <userinput>mkdir C:\mysql</userinput>
+C:\&gt; <userinput>mkdir C:\mysql\bin</userinput>
+C:\&gt; <userinput>mkdir C:\mysql\data</userinput>
+C:\&gt; <userinput>mkdir C:\mysql\share</userinput>
+C:\&gt; <userinput>mkdir C:\mysql\scripts</userinput>
+</programlisting>
+
+            <para>
+              If you want to compile other clients and link them to
+              MySQL, you should also create several additional
+              directories:
+            </para>
+
+<programlisting>
+C:\&gt; <userinput>mkdir C:\mysql\include</userinput>
+C:\&gt; <userinput>mkdir C:\mysql\lib</userinput>
+C:\&gt; <userinput>mkdir C:\mysql\lib\debug</userinput>
+C:\&gt; <userinput>mkdir C:\mysql\lib\opt</userinput>
+</programlisting>
+
+            <para>
+              If you want to benchmark MySQL, create this directory:
+            </para>
+
+<programlisting>
+C:\&gt; <userinput>mkdir C:\mysql\sql-bench</userinput>
+</programlisting>
+
+            <para>
+              Benchmarking requires Perl support. See
+              <xref linkend="perl-support"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              From the work directory, copy into the
+              <filename>C:\mysql</filename> directory the following
+              directories:
+            </para>
+
+<programlisting>
+C:\&gt; <userinput>cd \workdir</userinput>
+C:\workdir&gt; <userinput>copy client_release\*.exe C:\mysql\bin</userinput>
+C:\workdir&gt; <userinput>copy client_debug\mysqld.exe C:\mysql\bin\mysqld-debug.exe</userinput>
+C:\workdir&gt; <userinput>xcopy scripts\*.* C:\mysql\scripts /E</userinput>
+C:\workdir&gt; <userinput>xcopy share\*.* C:\mysql\share /E</userinput>
+</programlisting>
+
+            <para>
+              If you want to compile other clients and link them to
+              MySQL, you should also copy several libraries and header
+              files:
+            </para>
+
+<programlisting>
+C:\workdir&gt; <userinput>copy lib_debug\mysqlclient.lib C:\mysql\lib\debug</userinput>
+C:\workdir&gt; <userinput>copy lib_debug\libmysql.* C:\mysql\lib\debug</userinput>
+C:\workdir&gt; <userinput>copy lib_debug\zlib.* C:\mysql\lib\debug</userinput>
+C:\workdir&gt; <userinput>copy lib_release\mysqlclient.lib C:\mysql\lib\opt</userinput>
+C:\workdir&gt; <userinput>copy lib_release\libmysql.* C:\mysql\lib\opt</userinput>
+C:\workdir&gt; <userinput>copy lib_release\zlib.* C:\mysql\lib\opt</userinput>
+C:\workdir&gt; <userinput>copy include\*.h C:\mysql\include</userinput>
+C:\workdir&gt; <userinput>copy libmysql\libmysql.def C:\mysql\include</userinput>
+</programlisting>
+
+            <para>
+              If you want to benchmark MySQL, you should also do this:
+            </para>
+
+<programlisting>
+C:\workdir&gt; <userinput>xcopy sql-bench\*.* C:\mysql\bench /E</userinput>
+</programlisting>
+          </listitem>
+
+        </orderedlist>
+
+        <para>
+          After installation, set up and start the server in the same
+          way as for binary Windows distributions. See
+          <xref linkend="windows-installation"/>.
+        </para>
+
+      </section>
+
+    </section>
+
+    <section id="windows-client-compiling">
+
+      <title>Compiling MySQL Clients on Windows</title>
+
+      <indexterm>
+        <primary>compiling</primary>
+        <secondary>on Windows</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>Windows</primary>
+        <secondary>compiling on</secondary>
+      </indexterm>
+
+      <para>
+        In your source files, you should include
+        <filename>my_global.h</filename> before
+        <filename>mysql.h</filename>:
+      </para>
+
+<programlisting>
+#include &lt;my_global.h&gt;
+#include &lt;mysql.h&gt;
+</programlisting>
+
+      <para>
+        <filename>my_global.h</filename> includes any other files needed
+        for Windows compatibility (such as
+        <filename>windows.h</filename>) if you compile your program on
+        Windows.
+      </para>
+
+      <para>
+        You can either link your code with the dynamic
+        <filename>libmysql.lib</filename> library, which is just a
+        wrapper to load in <filename>libmysql.dll</filename> on demand,
+        or link with the static <filename>mysqlclient.lib</filename>
+        library.
+      </para>
+
+      <para>
+        The MySQL client libraries are compiled as threaded libraries,
+        so you should also compile your code to be multi-threaded.
+      </para>
+
+    </section>
+
+  </section>


Added: trunk/refman-5.1/installing-updowngrade.xml
===================================================================
--- trunk/refman-5.1/installing-updowngrade.xml	                        (rev 0)
+++ trunk/refman-5.1/installing-updowngrade.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 1, Lines Added: 2500, Lines Deleted: 0; 97382 bytes

@@ -0,0 +1,2500 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="upgrade-downgrade">
+
+    <title>Upgrading or Downgrading MySQL</title>
+
+    <indexterm>
+      <primary>upgrading</primary>
+    </indexterm>
+
+    <indexterm>
+      <primary>downgrading</primary>
+    </indexterm>
+
+    <section id="upgrade">
+
+      <title>Upgrading MySQL</title>
+
+      <indexterm>
+        <primary>upgrading</primary>
+      </indexterm>
+
+      <para>
+        As a general rule, to upgrade from one release series to
+        another, you should go to the next series rather than skipping a
+        series. To upgrade from a release series previous to MySQL
+        &previous-series;, upgrade to each successive release series in
+        turn until you have reached MySQL &previous-series;, and then
+        proceed with the upgrade to MySQL &current-series;. For example,
+        if you currently are running MySQL 4.0 and wish to upgrade to a
+        newer series, upgrade to MySQL 4.1 first before upgrading to
+        5.0, and so forth. For information on upgrading to MySQL
+        &previous-series;, see the
+        <citetitle>&title-refman-previous;</citetitle>; for earlier
+        releases, see the <citetitle>MySQL 3.23, 4.0, 4.1 Reference
+        Manual</citetitle>.
+      </para>
+
+      <para>
+        To upgrade from MySQL &previous-series; to &current-series;, use
+        the items in the following checklist as a guide:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Before any upgrade, back up your databases, including the
+            <literal>mysql</literal> database that contains the grant
+            tables. See <xref linkend="backup"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Read <emphasis>all</emphasis> the notes in
+            <xref linkend="upgrading-from-previous-series"/>. These
+            notes enable you to identify upgrade issues that apply to
+            your current MySQL installation. Some incompatibilities
+            discussed in that section require your attention
+            <emphasis>before</emphasis> upgrading. Others should be
+            dealt with <emphasis>after</emphasis> upgrading.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Read <xref linkend="news"/> as well, which provides
+            information about features that are new in MySQL
+            &current-series; or differ from those found in MySQL
+            &previous-series;.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            After you upgrade to a new version of MySQL, run
+            <command>mysql_upgrade</command> (see
+            <xref linkend="mysql-upgrade"/>). This program checks your
+            tables, and attempts to repair them if necessary. It also
+            updates your grant tables to make sure that they have the
+            current structure so that you can take advantage of any new
+            capabilities. (Some releases of MySQL introduce changes to
+            the structure of the grant tables to add new privileges or
+            features.)
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you are running MySQL Server on Windows, see
+            <xref linkend="windows-upgrading"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you are using replication, see
+            <xref linkend="replication-upgrade"/>, for information on
+            upgrading your replication setup.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you are upgrading an installation originally produced by
+            installing multiple RPM packages, it is best to upgrade all
+            the packages, not just some. For example, if you previously
+            installed the server and client RPMs, do not upgrade just
+            the server RPM.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            As of MySQL 5.1.9, the <command>mysqld-max</command> server
+            is included in binary distributions. There is no separate
+            MySQL-Max distribution. As of MySQL 5.1.12, there is no
+            <command>mysqld-max</command> server at all in binary
+            distributions. They contain a server that includes the
+            features previously included in
+            <command>mysqld-max</command>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If you have created a user-defined function (UDF) with a
+            given name and upgrade MySQL to a version that implements a
+            new built-in function with the same name, the UDF becomes
+            inaccessible. To correct this, use <literal role="stmt">DROP
+            FUNCTION</literal> to drop the UDF, and then use
+            <literal role="stmt">CREATE FUNCTION</literal> to re-create
+            the UDF with a different nonconflicting name. The same is
+            true if the new version of MySQL implements a built-in
+            function with the same name as an existing stored function.
+            See <xref linkend="function-resolution"/>, for the rules
+            describing how the server interprets references to different
+            kinds of functions.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        You can always move the MySQL format files and data files
+        between different versions on systems with the same architecture
+        as long as you stay within versions for the same release series
+        of MySQL.
+      </para>
+
+      <para>
+        If you are cautious about using new versions, you can always
+        rename your old <command>mysqld</command> before installing a
+        newer one. For example, if you are using MySQL
+        &previous-series;.13 and want to upgrade to &current-series;.10,
+        rename your current server from <command>mysqld</command> to
+        <command>mysqld-&previous-series;.13</command>. If your new
+        <command>mysqld</command> then does something unexpected, you
+        can simply shut it down and restart with your old
+        <command>mysqld</command>.
+      </para>
+
+      <para>
+        If, after an upgrade, you experience problems with recompiled
+        client programs, such as <literal>Commands out of sync</literal>
+        or unexpected core dumps, you probably have used old header or
+        library files when compiling your programs. In this case, you
+        should check the date for your <filename>mysql.h</filename> file
+        and <filename>libmysqlclient.a</filename> library to verify that
+        they are from the new MySQL distribution. If not, recompile your
+        programs with the new headers and libraries.
+      </para>
+
+      <para>
+        If problems occur, such as that the new
+        <command>mysqld</command> server does not start or that you
+        cannot connect without a password, verify that you do not have
+        an old <filename>my.cnf</filename> file from your previous
+        installation. You can check this with the
+        <option role="general">--print-defaults</option> option (for
+        example, <command>mysqld --print-defaults</command>). If this
+        command displays anything other than the program name, you have
+        an active <filename>my.cnf</filename> file that affects server
+        or client operation.
+      </para>
+
+      <para>
+        If your MySQL installation contains a large amount of data that
+        might take a long time to convert after an in-place upgrade, you
+        might find it useful to create a <quote>dummy</quote> database
+        instance for assessing what conversions might be needed and the
+        work involved to perform them. Make a copy of your MySQL
+        instance that contains a full copy of the
+        <literal>mysql</literal> database, plus all other databases
+        without data. Run your upgrade procedure on this dummy instance
+        to see what actions might be needed so that you can better
+        evaluate the work involved when performing actual data
+        conversion on your original database instance.
+      </para>
+
+      <para>
+        It is a good idea to rebuild and reinstall the Perl
+        <literal>DBD::mysql</literal> module whenever you install a new
+        release of MySQL. The same applies to other MySQL interfaces as
+        well, such as PHP <literal>mysql</literal> extensions and the
+        Python <literal>MySQLdb</literal> module.
+      </para>
+
+      <section id="upgrading-from-previous-series">
+
+        <title>Upgrading from MySQL 5.0 to 5.1</title>
+
+        <indexterm>
+          <primary>compatibility</primary>
+          <secondary>between MySQL versions</secondary>
+        </indexterm>
+
+        <indexterm>
+          <primary>upgrading</primary>
+          <secondary>to &amp;current-series;</secondary>
+        </indexterm>
+
+        <para>
+          <emphasis role="bold">After upgrading a 5.0 installation to
+          5.0.10 or above</emphasis>, it is
+          <emphasis>necessary</emphasis> to upgrade your grant tables.
+          Otherwise, creating stored procedures and functions might not
+          work. To perform this upgrade, run
+          <command>mysql_upgrade</command>.
+        </para>
+
+        <note>
+          <para>
+            It is good practice to back up your data before installing
+            any new version of software. Although MySQL works very hard
+            to ensure a high level of quality, you should protect your
+            data by making a backup.
+          </para>
+
+          <para>
+            To upgrade to &current-series; from any previous version,
+            MySQL recommends that you dump your tables with
+            <command>mysqldump</command> before upgrading and reload the
+            dump file after upgrading.
+          </para>
+        </note>
+
+        <para>
+          In general, you should do the following when upgrading from
+          MySQL &previous-series; to &current-series;:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              Read <emphasis>all</emphasis> the items in the following
+              sections to see whether any of them might affect your
+              applications:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  <xref linkend="upgrade"/>, has general update
+                  information.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The items in the change lists found later in this
+                  section enable you to identify upgrade issues that
+                  apply to your current MySQL installation.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The MySQL &current-series; change history describes
+                  significant new features you can use in
+                  &current-series; or that differ from those found in
+                  MySQL &previous-series;. Some of these changes may
+                  result in incompatibilities. See
+                  <xref linkend="news-5-1-x"/>.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </listitem>
+
+          <listitem>
+            <para>
+              Note particularly any changes that are marked
+              <emphasis role="bold">Known issue</emphasis> or
+              <emphasis role="bold">Incompatible change</emphasis>.
+              These incompatibilities with earlier versions of MySQL may
+              require your attention <emphasis>before you
+              upgrade</emphasis>.
+            </para>
+
+            <para>
+              Our aim is to avoid these changes, but occasionally they
+              are necessary to correct problems that would be worse than
+              an incompatibility between releases. If any upgrade issue
+              applicable to your installation involves an
+              incompatibility that requires special handling, follow the
+              instructions given in the incompatibility description.
+              Often this will involve a dump and reload, or use of a
+              statement such as <literal role="stmt">CHECK
+              TABLE</literal> or <literal role="stmt">REPAIR
+              TABLE</literal>.
+            </para>
+
+            <para>
+              For dump and reload instructions, see
+              <xref linkend="rebuilding-tables"/>. Any procedure that
+              involves <literal role="stmt">REPAIR TABLE</literal> with
+              the <literal>USE_FRM</literal> option
+              <emphasis>must</emphasis> be done before upgrading. Use of
+              this statement with a version of MySQL different from the
+              one used to create the table (that is, using it after
+              upgrading) may damage the table. See
+              <xref linkend="repair-table"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              After you upgrade to a new version of MySQL, run
+              <command>mysql_upgrade</command> (see
+              <xref linkend="mysql-upgrade"/>). This program checks your
+              tables, and attempts to repair them if necessary. It also
+              updates your grant tables to make sure that they have the
+              current structure so that you can take advantage of any
+              new capabilities. (Some releases of MySQL introduce
+              changes to the structure of the grant tables to add new
+              privileges or features.)
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Check <xref linkend="checking-index-changes"/>, to see
+              whether changes to character sets or collations were made
+              that affect your table indexes. If so, you will need to
+              rebuild the affected indexes using the instructions in
+              <xref linkend="rebuilding-tables"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              If you are running MySQL Server on Windows, see
+              <xref linkend="windows-upgrading"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              If you are using replication, see
+              <xref linkend="replication-upgrade"/>, for information on
+              upgrading your replication setup.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          If your MySQL installation contains a large amount of data
+          that might take a long time to convert after an in-place
+          upgrade, you might find it useful to create a
+          <quote>dummy</quote> database instance for assessing what
+          conversions might be needed and the work involved to perform
+          them. Make a copy of your MySQL instance that contains a full
+          copy of the <literal>mysql</literal> database, plus all other
+          databases without data. Run your upgrade procedure on this
+          dummy instance to see what actions might be needed so that you
+          can better evaluate the work involved when performing actual
+          data conversion on your original database instance.
+        </para>
+
+        <formalpara role="mnmas-kb">
+
+          <title>MySQL Enterprise</title>
+
+          <para>
+            MySQL Enterprise subscribers will find more information
+            about upgrading in the Knowledge Base articles found at
+            <ulink url="https://kb.mysql.com/search.php?cat=search&amp;category=41">
+            Upgrading</ulink>. Access to the MySQL Knowledge Base
+            collection of articles is one of the advantages of
+            subscribing to MySQL Enterprise. For more information, see
+            <ulink url="&base-url-enterprise;advisors.html"/>.
+          </para>
+
+        </formalpara>
+
+        <para>
+          The following lists describe changes that may affect
+          applications and that you should watch out for when upgrading
+          to MySQL &current-series;.
+        </para>
+
+        <para>
+          <emphasis role="bold">Configuration Changes:</emphasis>
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              Before MySQL 5.1.11, to build MySQL from source with SSL
+              support enabled, you would invoke
+              <command>configure</command> with either the
+              <option>--with-openssl</option> or
+              <option>--with-yassl</option> option. In MySQL 5.1.11,
+              those options both have been replaced by the
+              <option>--with-ssl</option> option. By default,
+              <option>--with-ssl</option> causes the bundled yaSSL
+              library to be used. To select OpenSSL instead, give the
+              option as
+              <option>--with-ssl=<replaceable>path</replaceable></option>,
+              where <replaceable>path</replaceable> is the directory
+              where the OpenSSL header files and libraries are located.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          <emphasis role="bold">Server Changes:</emphasis>
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Known issue</emphasis>: After a
+              binary upgrade to MySQL 5.1 from a MySQL 5.0 installation
+              that contains <literal role="se">ARCHIVE</literal> tables,
+              accessing those tables will cause the server to crash,
+              even if you have run <command>mysql_upgrade</command> or
+              <literal role="stmt" condition="check-table">CHECK TABLE
+              ... FOR UPGRADE</literal>. To work around this problem,
+              use <command>mysqldump</command> to dump all
+              <literal role="se">ARCHIVE</literal> tables before
+              upgrading, and reload them into MySQL 5.1 after upgrading.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Known issue</emphasis>: Dumps
+              performed by using <command>mysqldump</command> to
+              generate a dump file before the upgrade and reloading the
+              file after upgrading are subject to the following problem:
+            </para>
+
+            <para>
+              Before MySQL 5.0.40, <command>mysqldump</command> displays
+              <literal>SPATIAL</literal> index definitions using prefix
+              lengths for the indexed columns. These prefix lengths are
+              accepted in MySQL 5.0, but not as of MySQL 5.1. If you use
+              <command>mysqldump</command> from versions of MySQL older
+              than 5.0.40, any table containing
+              <literal>SPATIAL</literal> indexes will cause an error
+              when the dump file is reloaded into MySQL 5.1 or higher.
+            </para>
+
+            <para>
+              For example, a table definition might look like this when
+              dumped in MySQL 5.0:
+            </para>
+
+<programlisting>
+CREATE TABLE `t` (
+ `g` geometry NOT NULL,
+ SPATIAL KEY `g` (`g`(32))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+</programlisting>
+
+            <para>
+              The <literal>SPATIAL</literal> index definition will not
+              be accepted in MySQL 5.1. To work around this, edit the
+              dump file to remove the prefix:
+            </para>
+
+<programlisting>
+CREATE TABLE `t` (
+ `g` geometry NOT NULL,
+ SPATIAL KEY `g` (`g`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+</programlisting>
+
+            <para>
+              Dump files can be large, so it may be preferable to dump
+              table definitions and data separately to make it easier to
+              edit the definitions:
+            </para>
+
+<programlisting>
+shell&gt; <userinput>mysqldump --no-data <replaceable>other_args</replaceable> &gt; definitions.sql</userinput>
+shell&gt; <userinput>mysqldump --no-create-info <replaceable>other_args</replaceable> &gt; data.sql</userinput>
+</programlisting>
+
+            <para>
+              Then edit <filename>definitions.sql</filename> before
+              reloading <filename>definitions.sql</filename> and
+              <filename>data.sql</filename>, in that order.
+            </para>
+
+            <para>
+              If you upgrade to a version of MySQL 5.0 higher than
+              5.0.40 before upgrading to MySQL 5.1, this problem does
+              not occur.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Known issue</emphasis>: Before MySQL
+              5.1.30, the
+              <literal role="stmt" condition="check-table">CHECK TABLE
+              ... FOR UPGRADE</literal> statement did not check for
+              incompatible collation changes made in MySQL 5.1.24. (This
+              also affects <command>mysqlcheck</command> and
+              <command>mysql_upgrade</command>, which cause that
+              statement to be executed.)
+            </para>
+
+            <para>
+              Prior to the fix made in 5.1.30, a binary upgrade
+              (performed without dumping tables with
+              <command>mysqldump</command> before the upgrade and
+              reloading the dump file after the upgrade) would corrupt
+              tables. After the fix,
+              <literal role="stmt" condition="check-table">CHECK TABLE
+              ... FOR UPGRADE</literal> properly detects the problem and
+              warns about tables that need repair.
+            </para>
+
+            <para>
+              However, the fix is not backward compatible and can result
+              in a downgrading problem under these circumstances:
+            </para>
+
+            <orderedlist>
+
+              <listitem>
+                <para>
+                  Perform a binary upgrade to a version of MySQL that
+                  includes the fix.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Run <literal role="stmt" condition="check-table">CHECK
+                  TABLE ... FOR UPGRADE</literal> (or
+                  <command>mysqlcheck</command> or
+                  <command>mysql_upgrade</command>) to upgrade tables.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Perform a binary downgrade to a version of MySQL that
+                  does not include the fix.
+                </para>
+              </listitem>
+
+            </orderedlist>
+
+            <para>
+              The solution is to dump tables with
+              <command>mysqldump</command> before the downgrade and
+              reload the dump file after the downgrade. Alternatively,
+              drop and recreate affected indexes.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Known issue</emphasis>: MySQL
+              introduces encoding for table names that have non-ASCII
+              characters (see <xref linkend="identifier-mapping"/>).
+              After a binary upgrade from MySQL 5.0 to 5.1 or higher,
+              the server recognizes names that have non-ASCII characters
+              and adds a <literal>#mysql50#</literal> prefix to them.
+            </para>
+
+            <para>
+              As of MySQL 5.1.31, <command>mysql_upgrade</command>
+              encodes these names by executing the following command:
+            </para>
+
+<programlisting>
+mysqlcheck --all-databases --check-upgrade --fix-db-names --fix-table-names
+</programlisting>
+
+            <para>
+              Prior to MySQL 5.1.31, <command>mysql_upgrade</command>
+              does not execute this command, so you should execute it
+              manually if you have database or table names that contain
+              nonalphanumeric characters.
+            </para>
+
+            <para>
+              Prior to MySQL 5.1.23, the <command>mysqlcheck</command>
+              command does not perform the name encoding for views. To
+              work around this problem, drop each affected view and
+              recreate it.
+            </para>
+
+            <para>
+              <command>mysqlcheck</command> cannot fix names that
+              contain literal instances of the <literal>@</literal>
+              character that is used for encoding special characters. If
+              you have databases or tables that contain this character,
+              use <command>mysqldump</command> to dump them before
+              upgrading to MySQL &current-series;, and then reload the
+              dump file after upgrading.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Known issue</emphasis>: When
+              upgrading from MySQL 5.0 to versions of 5.1 prior to
+              5.1.23, running <command>mysqlcheck</command> (or
+              <command>mysql_upgrade</command>, which runs
+              <command>mysqlcheck</command>) to upgrade tables fails for
+              names that must be written as quoted identifiers. To work
+              around this problem, rename each affected table to a name
+              that does not require quoting:
+            </para>
+
+<programlisting>
+RENAME TABLE `tab``le_a` TO table_a;
+RENAME TABLE `table b` TO table_b;
+</programlisting>
+
+            <para>
+              After renaming the tables, run the
+              <command>mysql_upgrade</command> program. Then rename the
+              tables back to their original names:
+            </para>
+
+<programlisting>
+RENAME TABLE table_a TO `tab``le_a`;
+RENAME TABLE table_b TO `table b`;
+</programlisting>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Known issue</emphasis>: In
+              connection with view creation, the server created
+              <filename>arc</filename> directories inside database
+              directories and maintained useless copies of
+              <filename>.frm</filename> files there. Creation and
+              renaming procedures of those copies as well as creation of
+              <filename>arc</filename> directories has been discontinued
+              in MySQL 5.1.29.
+            </para>
+
+            <para>
+              This change does cause a problem when downgrading to older
+              server versions which manifests itself under these
+              circumstances:
+            </para>
+
+            <orderedlist>
+
+              <listitem>
+                <para>
+                  Create a view <literal>v_orig</literal> in MySQL
+                  5.1.29 or higher.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Rename the view to <literal>v_new</literal> and then
+                  back to <literal>v_orig</literal>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Downgrade to an older 5.1.x server and run
+                  <command>mysql_upgrade</command>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Try to rename <literal>v_orig</literal> to
+                  <literal>v_new</literal> again. This operation fails.
+                </para>
+              </listitem>
+
+            </orderedlist>
+
+            <para>
+              As a workaround to avoid this problem, use either of these
+              approaches:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  Dump your data using <command>mysqldump</command>
+                  before downgrading and reload the dump file after
+                  downgrading.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Instead of renaming a view after the downgrade, drop
+                  it and recreate it.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>:
+              Character set or collation changes were made in MySQL
+              5.1.21, 5.1.23, and 5.1.24 that may require table indexes
+              to be rebuilt. For details, see
+              <xref linkend="checking-index-changes"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>:
+              MySQL &current-series; implements support for a plugin API
+              that allows the loading and unloading of components at
+              runtime, without restarting the server.
+              <xref linkend="plugin-api"/>. The plugin API requires the
+              <literal>mysql.plugin</literal> table. After upgrading
+              from an older version of MySQL, you should run the
+              <command>mysql_upgrade</command> command to create this
+              table. See <xref linkend="mysql-upgrade"/>.
+            </para>
+
+            <para>
+              Plugins are installed in the directory named by the
+              <literal role="sysvar">plugin_dir</literal> system
+              variable. This variable also controls the location from
+              which the server loads user-defined functions (UDFs),
+              which is a change from earlier versions of MySQL. That is,
+              all UDF library files now must be installed in the plugin
+              directory. When upgrading from an older version of MySQL,
+              you must migrate your UDF files to the plugin directory.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: The
+              <literal role="sysvar">table_cache</literal> system
+              variable has been renamed to
+              <literal role="sysvar">table_open_cache</literal>. Any
+              scripts that refer to
+              <literal role="sysvar">table_cache</literal> must be
+              updated to use the new name.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: In
+              MySQL 5.1.36, options for loading plugins such as
+              pluggable storage engines were changed from boolean to
+              tristate format. The implementations overlap, but if you
+              previously used options of the form
+              <option>--<replaceable>plugin_name</replaceable>=0</option>
+              or
+              <option>--<replaceable>plugin_name</replaceable>=1</option>,
+              you should instead use
+              <option>--<replaceable>plugin_name</replaceable>=OFF</option>
+              or
+              <option>--<replaceable>plugin_name</replaceable>=ON</option>,
+              respectively. For details, see
+              <xref linkend="server-plugin-options"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: From
+              MySQL 5.1.24 to 5.1.31, the
+              <literal role="stmt">UPDATE</literal> statement was
+              changed such that assigning <literal>NULL</literal> to a
+              <literal>NOT NULL</literal> column caused an error even
+              when strict SQL mode was not enabled. The original
+              behavior before MySQL 5.1.24 was that such assignments
+              caused an error only in strict SQL mode, and otherwise set
+              the column to the implicit default value for the column
+              data type and generated a warning. (For information about
+              implicit default values, see
+              <xref linkend="data-type-defaults"/>.)
+            </para>
+
+            <para>
+              The change caused compatibility problems for applications
+              that relied on the original behavior. It also caused
+              replication problems between servers that had the original
+              behavior and those that did not, for applications that
+              assigned <literal>NULL</literal> to <literal>NOT
+              NULL</literal> columns in
+              <literal role="stmt">UPDATE</literal> statements without
+              strict SQL mode enabled. The change was reverted in MySQL
+              5.1.32 so that <literal role="stmt">UPDATE</literal> again
+              had the original behavior. Problems can still occur if you
+              replicate between servers that have the modified
+              <literal role="stmt">UPDATE</literal> behavior and those
+              that do not.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: As
+              of MySQL 5.1.29, the default binary logging mode has been
+              changed from <literal>MIXED</literal> to
+              <literal>STATEMENT</literal> for compatibility with MySQL
+              5.0.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: In
+              MySQL 5.1.25, a change was made to the way that the server
+              handles prepared statements. This affects prepared
+              statements processed at the SQL level (using the
+              <literal role="stmt">PREPARE</literal> statement) and
+              those processed using the binary client-server protocol
+              (using the
+              <literal role="cfunc">mysql_stmt_prepare()</literal> C API
+              function).
+            </para>
+
+            <para>
+              Previously, changes to metadata of tables or views
+              referred to in a prepared statement could cause a server
+              crash when the statement was next executed, or perhaps an
+              error at execute time with a crash occurring later. For
+              example, this could happen after dropping a table and
+              recreating it with a different definition.
+            </para>
+
+            <para>
+              Now metadata changes to tables or views referred to by
+              prepared statements are detected and cause automatic
+              repreparation of the statement when it is next executed.
+              Metadata changes occur for DDL statements such as those
+              that create, drop, alter, rename, or truncate tables, or
+              that analyze, optimize, or repair tables. Repreparation
+              also occurs after referenced tables or views are flushed
+              from the table definition cache, either implicitly to make
+              room for new entries in the cache, or explicitly due to
+              <literal role="stmt" condition="flush">FLUSH
+              TABLES</literal>.
+            </para>
+
+            <para>
+              Repreparation is automatic, but to the extent that it
+              occurs, performance of prepared statements is diminished.
+            </para>
+
+            <para>
+              Table content changes (for example, with
+              <literal role="stmt">INSERT</literal> or
+              <literal role="stmt">UPDATE</literal>) do not cause
+              repreparation, nor do
+              <literal role="stmt">SELECT</literal> statements.
+            </para>
+
+            <para>
+              An incompatibility with previous versions of MySQL is that
+              a prepared statement may now return a different set of
+              columns or different column types from one execution to
+              the next. For example, if the prepared statement is
+              <literal>SELECT * FROM t1</literal>, altering
+              <literal>t1</literal> to contain a different number of
+              columns causes the next execution to return a number of
+              columns different from the previous execution.
+            </para>
+
+            <para>
+              Older versions of the client library cannot handle this
+              change in behavior. For applications that use prepared
+              statements with the new server, an upgrade to the new
+              client library is strongly recommended.
+            </para>
+
+            <para>
+              Along with this change to statement repreparation, the
+              default value of the
+              <literal role="sysvar">table_definition_cache</literal>
+              system variable has been increased from 128 to 256. The
+              purpose of this increase is to lessen the chance that
+              prepared statements will need repreparation due to
+              referred-to tables/views having been flushed from the
+              cache to make room for new entries.
+            </para>
+
+            <para>
+              A new status variable,
+              <literal>Com_stmt_reprepare</literal>, has been introduced
+              to track the number of repreparations.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: As
+              of MySQL 5.1.23, within a stored routine, it is no longer
+              allowable to declare a cursor for a
+              <literal role="stmt">SHOW</literal> or
+              <literal role="stmt">DESCRIBE</literal> statement. This
+              happened to work in some instances, but is no longer
+              supported. In many cases, a workaround for this change is
+              to use the cursor with a
+              <literal role="stmt">SELECT</literal> query to read from
+              an <literal>INFORMATION_SCHEMA</literal> table that
+              produces the same information as the
+              <literal role="stmt">SHOW</literal> statement.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change:</emphasis>
+              <literal role="stmt">SHOW CREATE VIEW</literal> displays
+              view definitions using an <literal>AS
+              <replaceable>alias_name</replaceable></literal> clause for
+              each column. If a column is created from an expression,
+              the default alias is the expression text, which can be
+              quite long. As of MySQL 5.1.23, aliases for column names
+              in <literal role="stmt">CREATE VIEW</literal> statements
+              are checked against the maximum column length of 64
+              characters (not the maximum alias length of 256
+              characters). As a result, views created from the output of
+              <literal role="stmt">SHOW CREATE VIEW</literal> fail if
+              any column alias exceeds 64 characters. This can cause
+              problems for replication or loading dump files. For
+              additional information and workarounds, see
+              <xref linkend="view-restrictions"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>:
+              Several issues were identified for stored programs (stored
+              procedures and functions, triggers, and events) and views
+              containing non-ASCII symbols. These issues involved
+              conversion errors due to incomplete character set
+              information when translating these objects to and from
+              stored format.
+            </para>
+
+            <para>
+              To address these problems, the representation for these
+              objects was changed in MySQL 5.1.21. However, the fixes
+              affect <emphasis>all</emphasis> stored programs and views.
+              (For example, you will see warnings about <quote>no
+              creation context.</quote>) To avoid warnings from the
+              server about the use of old definitions from any release
+              prior to 5.1.21, you should dump stored programs and views
+              with <command>mysqldump</command> after upgrading to
+              5.1.21 or higher, and then reload them to recreate them
+              with new definitions. Invoke <command>mysqldump</command>
+              with a <option>--default-character-set</option> option
+              that names the non-ASCII character set that was used for
+              the definitions when the objects were originally defined.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: As
+              of MySQL 5.1.20, <command>mysqld_safe</command> supports
+              error logging to <literal>syslog</literal> on systems that
+              support the <command>logger</command> command. The new
+              <option role="mysqld_safe">--syslog</option> and
+              <option role="mysqld_safe" condition="syslog">--skip-syslog</option>
+              options can be used instead of the
+              <option role="mysqld_safe">--log-error</option> option to
+              control logging behavior, as described in
+              <xref linkend="mysqld-safe"/>.
+            </para>
+
+            <para>
+              In 5.1.21 and up, the default is
+              <option role="mysqld_safe" condition="syslog">--skip-syslog</option>,
+              which is compatible with the default behavior of writing
+              an error log file for releases prior to 5.1.20.
+            </para>
+
+            <para>
+              <emphasis role="bold">In 5.1.20 <emphasis>only</emphasis>,
+              the following conditions apply</emphasis>: 1) The default
+              is to use <literal>syslog</literal>, which is not
+              compatible with releases prior to 5.1.20. 2) Logging to
+              <literal>syslog</literal> may fail to operate correctly in
+              some cases. For these reasons, avoid using MySQL 5.1.20.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: As
+              of MySQL 5.1.18, the plugin interface and its handling of
+              system variables was changed. Command-line options such as
+              <option role="mysqld" condition="innodb">--skip-innodb</option>
+              now cause an error if <literal>InnoDB</literal> is not
+              built-in or plugin-loaded. You should use
+              <option>--loose-skip-innodb</option> if you do not want
+              any error even if <literal>InnoDB</literal> is not
+              available. The <option>--loose</option> prefix modifier
+              should be used for all command-line options where you are
+              uncertain whether the plugin exists and when you want the
+              operation to proceed even if the option is necessarily
+              ignored due to the absence of the plugin. (For a
+              desecription of how <option>--loose</option> works, see
+              <xref linkend="command-line-options"/>.)
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: As
+              of MySQL 5.1.15, <literal>InnoDB</literal> rolls back only
+              the last statement on a transaction timeout. A new option,
+              <option role="sysvar">--innodb_rollback_on_timeout</option>,
+              causes <literal>InnoDB</literal> to abort and roll back
+              the entire transaction if a transaction timeout occurs
+              (the same behavior as in MySQL 4.1).
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: As
+              of MySQL 5.1.15, the following conditions apply to
+              enabling the <literal role="sysvar">read_only</literal>
+              system variable:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  If you attempt to enable
+                  <literal role="sysvar">read_only</literal> while you
+                  have any explicit locks (acquired with
+                  <literal role="stmt">LOCK TABLES</literal> or have a
+                  pending transaction, an error will occur.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  If other clients hold explicit table locks or have
+                  pending transactions, the attempt to enable
+                  <literal role="sysvar">read_only</literal> blocks
+                  until the locks are released and the transactions end.
+                  While the attempt to enable
+                  <literal role="sysvar">read_only</literal> is pending,
+                  requests by other clients for table locks or to begin
+                  transactions also block until
+                  <literal role="sysvar">read_only</literal> has been
+                  set.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  <literal role="sysvar">read_only</literal> can be
+                  enabled while you hold a global read lock (acquired
+                  with <literal role="stmt" condition="flush">FLUSH
+                  TABLES WITH READ LOCK</literal>) because that does not
+                  involve table locks.
+                </para>
+
+<!--
+This means that the following
+                sequence of statements can be used to place a server in
+                read-only state prior to performing a backup:
+              </para>
+
+<programlisting>
+FLUSH TABLES WITH READ LOCK;
+SET GLOBAL read_only = ON;
+UNLOCK TABLES;
+</programlisting>
+-->
+              </listitem>
+
+            </itemizedlist>
+
+            <para>
+              Previously, the attempt to enable
+              <literal role="sysvar">read_only</literal> would return
+              immediately even if explicit locks or transactions were
+              pending, so some data changes could occur for statements
+              executing in the server at the same time.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: The
+              number of function names affected by
+              <literal role="sqlmode">IGNORE_SPACE</literal> was reduced
+              significantly in MySQL 5.1.13, from about 200 to about 30.
+              (For details about
+              <literal role="sqlmode">IGNORE_SPACE</literal>, see
+              <xref linkend="function-resolution"/>.) This change
+              improves the consistency of parser operation. However, it
+              also introduces the possibility of incompatibility for old
+              SQL code that relies on the following conditions:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  <literal role="sqlmode">IGNORE_SPACE</literal> is
+                  disabled.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The presence or absence of whitespace following a
+                  function name is used to distinguish between a
+                  built-in function and stored function that have the
+                  same name (for example,
+                  <literal role="func">PI()</literal> versus <literal>PI
+                  ()</literal>).
+                </para>
+              </listitem>
+
+            </itemizedlist>
+
+            <para>
+              For functions that are no longer affected by
+              <literal role="sqlmode">IGNORE_SPACE</literal> as of MySQL
+              5.1.13, that strategy no longer works. Either of the
+              following approaches can be used if you have code that is
+              subject to the preceding incompatibility:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  If a stored function has a name that conflicts with a
+                  built-in function, refer to the stored function with a
+                  schema name qualifier, regardless of whether
+                  whitespace is present. For example, write
+                  <literal><replaceable>schema_name</replaceable>.PI()</literal>
+                  or <literal><replaceable>schema_name</replaceable>.PI
+                  ()</literal>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Alternatively, rename the stored function to use a
+                  nonconflicting name and change invocations of the
+                  function to use the new name.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: For
+              <literal>utf8</literal> columns, the full-text parser
+              incorrectly considered several nonword punctuation and
+              whitespace characters as word characters, causing some
+              searches to return incorrect results. The fix involves a
+              change to the full-text parser in MySQL 5.1.12, so as of
+              5.1.12, any tables that have <literal>FULLTEXT</literal>
+              indexes on <literal>utf8</literal> columns must be
+              repaired with <literal role="stmt">REPAIR TABLE</literal>:
+            </para>
+
+<programlisting>
+REPAIR TABLE <replaceable>tbl_name</replaceable> QUICK;
+</programlisting>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>:
+              Storage engines can be pluggable at runtime, so the
+              distinction between disabled and invalid storage engines
+              no longer applies. As of MySQL 5.1.12, this affects the
+              <literal role="sqlmode">NO_ENGINE_SUBSTITUTION</literal>
+              SQL mode, as described in
+              <xref linkend="server-sql-mode"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: The
+              structure of <literal>FULLTEXT</literal> indexes has been
+              changed in MySQL 5.1.6. After upgrading to MySQL 5.1.6 or
+              greater, any tables that have <literal>FULLTEXT</literal>
+              indexes must be repaired with <literal role="stmt">REPAIR
+              TABLE</literal>:
+            </para>
+
+<programlisting>
+REPAIR TABLE <replaceable>tbl_name</replaceable> QUICK;
+</programlisting>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: In
+              MySQL 5.1.6, when log tables were implemented, the default
+              log destination for the general query and slow query log
+              was <literal>TABLE</literal>. As of MySQL 5.1.21, this
+              default has been changed to <literal>FILE</literal>, which
+              is compatible with MySQL 5.0, but incompatible with
+              earlier releases of MySQL 5.1. If you are upgrading from
+              MySQL 5.0 to 5.1.21 or higher, no logging option changes
+              should be necessary. However, if you are upgrading from
+              5.1.6 through 5.1.20 to 5.1.21 or higher and were using
+              <literal>TABLE</literal> logging, use the
+              <option>--log-output=TABLE</option> option explicitly to
+              preserve your server's table-logging behavior.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: For
+              <literal role="type">ENUM</literal> columns that had
+              enumeration values containing commas, the commas were
+              mapped to <literal>0xff</literal> internally. However,
+              this rendered the commas indistinguishable from true
+              <literal>0xff</literal> characters in the values. This no
+              longer occurs. However, the fix requires that you dump and
+              reload any tables that have
+              <literal role="type">ENUM</literal> columns containing
+              true <literal>0xff</literal> in their values: Dump the
+              tables using <command>mysqldump</command> with the current
+              server before upgrading from a version of MySQL 5.1 older
+              than 5.1.15 to version 5.1.15 or newer.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              As of MySQL 5.1.12, the
+              <literal role="sysvar">lc_time_names</literal> system
+              variable specifies the locale that controls the language
+              used to display day and month names and abbreviations.
+              This variable affects the output from the
+              <literal role="func">DATE_FORMAT()</literal>,
+              <literal role="func">DAYNAME()</literal> and
+              <literal role="func">MONTHNAME()</literal> functions. See
+              <xref linkend="locale-support"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              As of MySQL 5.1.9, <command>mysqld_safe</command> no
+              longer implicitly invokes <command>mysqld-max</command> if
+              it exists. Instead, it invokes <command>mysqld</command>
+              unless a <option>--mysqld</option> or
+              <option role="mysqld_safe">--mysqld-version</option>
+              option is given to specify another server explicitly. If
+              you previously relied on the implicit invocation of
+              <command>mysqld-max</command>, you should use an
+              appropriate option now. As of MySQL 5.1.12, there is no
+              longer any separate <command>mysqld-max</command> server,
+              so no change should be necessary.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <remark>
+          Uncomment this block if any client changes are noted
+        </remark>
+
+<!--
+      <para>
+        <emphasis role="bold">Client Changes:</emphasis>
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            <remark>
+              Add new items here.
+            </remark>
+          </para>
+        </listitem>
+
+      </itemizedlist>
+-->
+
+        <para>
+          <emphasis role="bold">SQL Changes:</emphasis>
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Known issue</emphasis>: Prior to
+              MySQL 5.1.17, the parser accepted invalid code in SQL
+              condition handlers, leading to server crashes or
+              unexpected execution behavior in stored programs.
+              Specifically, the parser allowed a condition handler to
+              refer to labels for blocks that enclose the handler
+              declaration. This was incorrect because block label scope
+              does not include the code for handlers declared within the
+              labeled block.
+            </para>
+
+            <para>
+              As of 5.1.17, the parser rejects this invalid construct,
+              but if you perform a binary upgrade (without dumping and
+              reloading your databases), existing handlers that contain
+              the construct still are invalid and should be rewritten
+              <emphasis>even if they appear to function as you
+              expect.</emphasis>
+            </para>
+
+            <para>
+              To find affected handlers, use
+              <command>mysqldump</command> to dump all stored procedures
+              and functions, triggers, and events. Then attempt to
+              reload them into an upgraded server. Handlers that contain
+              illegal label references will be rejected.
+            </para>
+
+            <para>
+              For more information about condition handlers and writing
+              them to avoid invalid jumps, see
+              <xref linkend="declare-handler"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change:</emphasis> The
+              parser accepted statements that contained <literal>/* ...
+              */</literal> that were not properly closed with
+              <literal>*/</literal>, such as <literal>SELECT 1 /* +
+              2</literal>. As of MySQL 5.1.23, statements that contain
+              unclosed <literal>/*</literal>-comments now are rejected
+              with a syntax error.
+            </para>
+
+            <para>
+              This fix has the potential to cause incompatibilities.
+              Because of Bug#26302, which caused the trailing
+              <literal>*/</literal> to be truncated from comments in
+              views, stored routines, triggers, and events, it is
+              possible that objects of those types may have been stored
+              with definitions that now will be rejected as
+              syntactically invalid. Such objects should be dropped and
+              re-created so that their definitions do not contain
+              truncated comments.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change:</emphasis>
+              Multiple-table <literal role="stmt">DELETE</literal>
+              statements containing ambiguous aliases could have
+              unintended side effects such as deleting rows from the
+              wrong table. Example:
+            </para>
+
+<programlisting>
+DELETE FROM t1 AS a2 USING t1 AS a1 INNER JOIN t2 AS a2;
+</programlisting>
+
+            <para>
+              As of MySQL 5.1.23, alias declarations can be declared
+              only in the <replaceable>table_references</replaceable>
+              part. Elsewhere in the statement, alias references are
+              allowed but not alias declarations. Statements containing
+              aliases that are no longer allowed must be rewritten.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: As
+              of MySQL 5.1.8, <literal>TYPE =
+              <replaceable>engine_name</replaceable></literal> is still
+              accepted as a synonym for the <literal>ENGINE =
+              <replaceable>engine_name</replaceable></literal> table
+              option but generates a warning. You should note that this
+              option is not available in MySQL 5.1.7, and
+              <emphasis role="bold">is removed altogether as of MySQL
+              &next-series; and produces a syntax error</emphasis>.
+            </para>
+
+            <para>
+              <literal>TYPE</literal> has been deprecated since MySQL
+              4.0.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change:</emphasis> The
+              namespace for triggers changed in MySQL 5.0.10.
+              Previously, trigger names had to be unique per table. Now
+              they must be unique within the schema (database). An
+              implication of this change is that
+              <literal role="stmt">DROP TRIGGER</literal> syntax now
+              uses a schema name instead of a table name (schema name is
+              optional and, if omitted, the current schema will be
+              used).
+            </para>
+
+            <para>
+              When upgrading from a version of MySQL 5 older than 5.0.10
+              to MySQL 5.0.10 or newer, you must drop all triggers and
+              re-create them or <literal role="stmt">DROP
+              TRIGGER</literal> will not work after the upgrade. Here is
+              a suggested procedure for doing this:
+            </para>
+
+            <orderedlist>
+
+              <listitem>
+                <para>
+                  Upgrade to MySQL 5.0.10 or later to be able to access
+                  trigger information in the
+                  <literal role="is">INFORMATION_SCHEMA.TRIGGERS</literal>
+                  table. (This should work even for pre-5.0.10
+                  triggers.)
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Dump all trigger definitions using the following
+                  <literal role="stmt">SELECT</literal> statement:
+                </para>
+
+<programlisting>
+SELECT CONCAT('CREATE TRIGGER ', t.TRIGGER_SCHEMA, '.', t.TRIGGER_NAME,
+              ' ', t.ACTION_TIMING, ' ', t.EVENT_MANIPULATION, ' ON ',
+              t.EVENT_OBJECT_SCHEMA, '.', t.EVENT_OBJECT_TABLE,
+              ' FOR EACH ROW ', t.ACTION_STATEMENT, '//' )
+INTO OUTFILE '/tmp/triggers.sql'
+FROM INFORMATION_SCHEMA.TRIGGERS AS t;
+</programlisting>
+
+                <para>
+                  The statement uses <literal>INTO OUTFILE</literal>, so
+                  you must have the <literal role="priv">FILE</literal>
+                  privilege. The file will be created on the server
+                  host. Use a different file name if you like. To be
+                  100% safe, inspect the trigger definitions in the
+                  <filename>triggers.sql</filename> file, and perhaps
+                  make a backup of the file.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Stop the server and drop all triggers by removing all
+                  <filename>.TRG</filename> files in your database
+                  directories. Change location to your data directory
+                  and issue this command:
+                </para>
+
+<programlisting>
+shell&gt; <userinput>rm */*.TRG</userinput>
+</programlisting>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Start the server and re-create all triggers using the
+                  <filename>triggers.sql</filename> file:
+                </para>
+
+<programlisting>
+mysql&gt; <userinput>delimiter // ;</userinput>
+mysql&gt; <userinput>source /tmp/triggers.sql //</userinput>
+</programlisting>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Check that all triggers were successfully created
+                  using the <filename>SHOW TRIGGERS</filename>
+                  statement.
+                </para>
+              </listitem>
+
+            </orderedlist>
+          </listitem>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>:
+              MySQL 5.1.6 introduces the
+              <literal role="priv">TRIGGER</literal> privilege.
+              Previously, the <literal role="priv">SUPER</literal>
+              privilege was needed to create or drop triggers. Now those
+              operations require the
+              <literal role="priv">TRIGGER</literal> privilege. This is
+              a security improvement because you no longer need to grant
+              users the <literal role="priv">SUPER</literal> privilege
+              to enable them to create triggers. However, the
+              requirement that the account named in a trigger's
+              <literal>DEFINER</literal> clause must have the
+              <literal role="priv">SUPER</literal> privilege has changed
+              to a requirement for the
+              <literal role="priv">TRIGGER</literal> privilege. When
+              upgrading from a previous version of MySQL 5.0 or 5.1 to
+              MySQL 5.1.6 or newer, be sure to update your grant tables
+              by running <command>mysql_upgrade</command>. This will
+              assign the <literal role="priv">TRIGGER</literal>
+              privilege to all accounts that had the
+              <literal role="priv">SUPER</literal> privilege. If you
+              fail to update the grant tables, triggers may fail when
+              activated. After updating the grant tables, you can revoke
+              the <literal role="priv">SUPER</literal> privilege from
+              those accounts that no longer otherwise require it.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Some keywords are reserved in MySQL &current-series; that
+              were not reserved in MySQL &previous-series;. See
+              <xref linkend="reserved-words"/>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The <literal>LOAD DATA FROM MASTER</literal> and
+              <literal>LOAD TABLE FROM MASTER</literal> statements are
+              deprecated. See <xref linkend="load-data-from-master"/>,
+              for recommended alternatives.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              The <literal role="stmt">INSTALL PLUGIN</literal> and
+              <literal role="stmt">UNINSTALL PLUGIN</literal> statements
+              that are used for the plugin API are new. So is the
+              <literal>WITH PARSER</literal> clause for
+              <literal>FULLTEXT</literal> index creation that associates
+              a parser plugin with a full-text index.
+              <xref linkend="plugin-api"/>.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          <emphasis role="bold">C API Changes:</emphasis>
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <emphasis role="bold">Incompatible change</emphasis>: As
+              of MySQL 5.1.7, the
+              <literal role="cfunc">mysql_stmt_attr_get()</literal> C
+              API function returns a boolean rather than an unsigned int
+              for <literal>STMT_ATTR_UPDATE_MAX_LENGTH</literal>. (Bug
+              #16144)
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+      </section>
+
+    </section>
+
+    <section id="downgrading">
+
+      <title>Downgrading MySQL</title>
+
+      <indexterm>
+        <primary>downgrading</primary>
+      </indexterm>
+
+      <para>
+        This section describes what you should do to downgrade to an
+        older MySQL version in the unlikely case that the previous
+        version worked better than the new one.
+      </para>
+
+      <para>
+        If you are downgrading within the same release series (for
+        example, from &previous-series;.13 to &previous-series;.12) the
+        general rule is that you just have to install the new binaries
+        on top of the old ones. There is no need to do anything with the
+        databases. As always, however, it is always a good idea to make
+        a backup.
+      </para>
+
+      <para>
+        The following items form a checklist of things you should do
+        whenever you perform a downgrade:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Read the upgrading section for the release series from which
+            you are downgrading to be sure that it does not have any
+            features you really need. See <xref linkend="upgrade"/>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            If there is a downgrading section for that version, you
+            should read that as well.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            To see which new features were added between the version to
+            which you are downgrading and your current version, see the
+            change logs (<xref linkend="news"/>).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Check <xref linkend="checking-index-changes"/>, to see
+            whether changes to character sets or collations were made
+            between your current version of MySQL and the version to
+            which you are downgrading. If so and these changes affect
+            your table indexes, you will need to rebuild the affected
+            indexes using the instructions in
+            <xref linkend="rebuilding-tables"/>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        In most cases, you can move the MySQL format files and data
+        files between different versions on the same architecture as
+        long as you stay within versions for the same release series of
+        MySQL.
+      </para>
+
+      <para>
+        If you downgrade from one release series to another, there may
+        be incompatibilities in table storage formats. In this case, use
+        <command>mysqldump</command> to dump your tables before
+        downgrading. After downgrading, reload the dump file using
+        <command>mysql</command> or <command>mysqlimport</command> to
+        re-create your tables. For examples, see
+        <xref linkend="copying-databases"/>.
+      </para>
+
+      <para>
+        A typical symptom of a downward-incompatible table format change
+        when you downgrade is that you cannot open tables. In that case,
+        use the following procedure:
+      </para>
+
+      <orderedlist>
+
+        <listitem>
+          <para>
+            Stop the older MySQL server that you are downgrading to.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Restart the newer MySQL server you are downgrading from.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Dump any tables that were inaccessible to the older server
+            by using <command>mysqldump</command> to create a dump file.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Stop the newer MySQL server and restart the older one.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Reload the dump file into the older server. Your tables
+            should be accessible.
+          </para>
+        </listitem>
+
+      </orderedlist>
+
+      <para>
+        It might also be the case that the structure of the system
+        tables in the <literal>mysql</literal> database has changed and
+        that downgrading introduces some loss of functionality or
+        requires some adjustments. Here are some examples:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Trigger creation requires the <literal>TRIGGER</literal>
+            privilege as of MySQL 5.1. In MySQL 5.0, there is no
+            <literal>TRIGGER</literal> privilege and
+            <literal>SUPER</literal> is required instead. If you
+            downgrade from MySQL 5.1 to 5.0, you will need to give the
+            <literal>SUPER</literal> privilege to those accounts that
+            had the <literal>TRIGGER</literal> privilege in 5.1.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Triggers were added in MySQL 5.0, so if you downgrade from
+            5.0 to 4.1, you cannot use triggers at all.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <section id="downgrading-to-5-0">
+
+        <title>Downgrading to MySQL 5.0</title>
+
+        <para>
+          When downgrading to MySQL 5.0 from MySQL 5.1 or a later
+          version, you should keep in mind the following issues relating
+          to features found in MySQL 5.1 and later, but not in MySQL
+          5.0:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <formalpara>
+
+              <title>Partitioning</title>
+
+              <para>
+                MySQL 5.0 does not support user-defined partitioning. If
+                a table was created as a partitioned table in 5.1 (or if
+                an table created in a previous version of MySQL was
+                altered to include partitions after an upgrade to 5.1),
+                the table is accessible after downgrade only if you do
+                one of the following:
+
+                <itemizedlist>
+
+                  <listitem>
+                    <para>
+                      Export the table using
+                      <command>mysqldump</command> and then drop it in
+                      MySQL 5.1; import the table again following the
+                      downgrade to MySQL 5.0.
+                    </para>
+                  </listitem>
+
+                  <listitem>
+                    <para>
+                      Prior to the downgrade, remove the table's
+                      partitioning using <literal>ALTER TABLE
+                      <replaceable>table_name</replaceable> REMOVE
+                      PARTITIONING</literal>.
+                    </para>
+                  </listitem>
+
+                </itemizedlist>
+              </para>
+
+            </formalpara>
+          </listitem>
+
+          <listitem>
+            <formalpara>
+
+              <title>Event Scheduler</title>
+
+              <para>
+                MySQL 5.0 does not support scheduled events. If your
+                databases contain scheduled event definitions, you
+                should prevent them from being dumped when you use
+                <command>mysqldump</command> by using the
+                <option role="mysqldump" condition="events">--skip-events</option>
+                option. (See <xref linkend="mysqldump"/>.)
+              </para>
+
+            </formalpara>
+          </listitem>
+
+          <listitem>
+            <formalpara>
+
+              <title>Stored routines</title>
+
+              <para>
+                MySQL 5.1.21 added a number of new columns to the
+                <literal>mysql.proc</literal> table in which stored
+                routine definitions are stored. If you are downgrading
+                from MySQL 5.1.21 or later to MySQL 5.0, you cannot
+                import the MySQL 5.1 routine definitions into MySQL
+                5.0.46 or earlier using the dump of
+                <literal>mysql.proc</literal> created by
+                <command>mysqldump</command> (such as when using the
+                <option>--all-databases</option> option). Instead, you
+                should run <command>mysqldump
+                <option role="mysqldump">--routines</option></command>
+                prior to performing the downgrade and run the stored
+                routines DDL statements following the downgrade.
+              </para>
+
+            </formalpara>
+
+            <para>
+              See Bug#11986, Bug#30029, and Bug#30660, for more
+              information.
+            </para>
+          </listitem>
+
+          <listitem>
+            <formalpara>
+
+              <title>Triggers</title>
+
+              <para>
+                Trigger creation requires the <literal>TRIGGER</literal>
+                privilege as of MySQL 5.1. In MySQL 5.0, there is no
+                <literal>TRIGGER</literal> privilege and
+                <literal>SUPER</literal> is required instead. If you
+                downgrade from MySQL 5.1 to 5.0, you will need to give
+                the <literal>SUPER</literal> privilege to those accounts
+                that had the <literal>TRIGGER</literal> privilege in
+                5.1.
+              </para>
+
+            </formalpara>
+          </listitem>
+
+        </itemizedlist>
+
+      </section>
+
+    </section>
+
+    <section id="checking-index-changes">
+
+      <title>Checking Whether Table Indexes Must Be Rebuilt</title>
+
+      <para>
+        A binary upgrade or downgrade is one that installs one version
+        of MySQL <quote>in place</quote> over an existing version,
+        without dumping and reloading tables:
+      </para>
+
+      <orderedlist>
+
+        <listitem>
+          <para>
+            Stop the server for the existing version if it is running.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Install a different version of MySQL. This is an upgrade if
+            the new version is higher than the original version, a
+            downgrade if the version is lower.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Start the server for the new version.
+          </para>
+        </listitem>
+
+      </orderedlist>
+
+      <para>
+        In many cases, the tables from the previous version of MySQL can
+        be used without change by the new version. However, sometimes
+        modifications are made to the handling of character sets or
+        collations that change the character sort order, which causes
+        the ordering of entries in any index that uses an affected
+        character set or collation to be incorrect. Such changes result
+        in several possible problems:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Comparison results that differ from previous results
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Inability to find some index values due to misordered index
+            entries
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Misordered <literal>ORDER BY</literal> results
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Tables that <literal role="stmt">CHECK TABLE</literal>
+            reports as being in need of repair
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        The solution to these problems is to rebuild any indexes that
+        use an affected character set or collation, either by dropping
+        and re-creating the indexes, or by dumping and reloading the
+        entire table. For information about rebuilding indexes, see
+        <xref linkend="rebuilding-tables"/>.
+      </para>
+
+      <para>
+        To check whether a table has indexes that must be rebuilt,
+        consult the following list. It indicates which versions of MySQL
+        introduced character set or collation changes that require
+        indexes to be rebuilt. Each entry indicates the version in which
+        the change occurred and the character sets or collations that
+        the change affects. If the change is associated with a
+        particular bug report, the bug number is given.
+      </para>
+
+      <para>
+        The list applies both for binary upgrades and downgrades. For
+        example, Bug#29461 was fixed in MySQL 5.0.48, so it applies to
+        upgrades from versions older than 5.0.48 to 5.0.48 or newer, and
+        also to downgrades from 5.0.48 or newer to versions older than
+        5.0.48.
+      </para>
+
+      <para>
+        If you have tables with indexes that are affected, rebuild the
+        indexes using the instructions given in
+        <xref linkend="rebuilding-tables"/>.
+      </para>
+
+      <para>
+        In many cases, you can use
+        <literal role="stmt" condition="check-table">CHECK TABLE ... FOR
+        UPGRADE</literal> to identify tables for which index rebuilding
+        is required. (It will report: <literal>Table upgrade required.
+        Please do "REPAIR TABLE `tbl_name`" or dump/reload to fix
+        it!</literal>) In these cases, you can also use
+        <command>mysqlcheck --check-upgrade</command> or
+        <command>mysql_upgrade</command>, which execute
+        <literal role="stmt">CHECK TABLE</literal>. However, the use of
+        <literal role="stmt">CHECK TABLE</literal> applies only after
+        upgrades, not downgrades. Also, <literal role="stmt">CHECK
+        TABLE</literal> is not applicable to all storage engines. For
+        details about which storage engines <literal role="stmt">CHECK
+        TABLE</literal> supports, see <xref linkend="check-table"/>.
+      </para>
+
+      <para>
+        Changes that cause index rebuilding to be necessary:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            MySQL 5.0.48 (Bug#29461)
+          </para>
+
+          <para>
+            Affects indexes for columns that use any of these character
+            sets: <literal>eucjpms</literal>, <literal>euc_kr</literal>,
+            <literal>gb2312</literal>, <literal>latin7</literal>,
+            <literal>macce</literal>, <literal>ujis</literal>
+          </para>
+
+          <para>
+            Affected tables can be detected by
+            <literal role="stmt" condition="check-table">CHECK TABLE ...
+            FOR UPGRADE</literal> as of MySQL 5.1.29, 5.4.0 (see
+            Bug#39585).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            MySQL 5.0.48 (Bug#27562)
+          </para>
+
+          <para>
+            Affects indexes that use the
+            <literal>ascii_general_ci</literal> collation for columns
+            that contain any of these characters: <literal>'`'</literal>
+            GRAVE ACCENT, <literal>'['</literal> LEFT SQUARE BRACKET,
+            <literal>'\'</literal> REVERSE SOLIDUS,
+            <literal>']'</literal> RIGHT SQUARE BRACKET,
+            <literal>'~'</literal> TILDE
+          </para>
+
+          <para>
+            Affected tables can be detected by
+            <literal role="stmt" condition="check-table">CHECK TABLE ...
+            FOR UPGRADE</literal> as of MySQL 5.1.29, 5.4.0 (see
+            Bug#39585).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            MySQL 5.1.21 (Bug#29461)
+          </para>
+
+          <para>
+            Affects indexes for columns that use any of these character
+            sets: <literal>eucjpms</literal>, <literal>euc_kr</literal>,
+            <literal>gb2312</literal>, <literal>latin7</literal>,
+            <literal>macce</literal>, <literal>ujis</literal>
+          </para>
+
+          <para>
+            Affected tables can be detected by
+            <literal role="stmt" condition="check-table">CHECK TABLE ...
+            FOR UPGRADE</literal> as of MySQL 5.1.29, 5.4.0 (see
+            Bug#39585).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            MySQL 5.1.23 (Bug#27562)
+          </para>
+
+          <para>
+            Affects indexes that use the
+            <literal>ascii_general_ci</literal> collation for columns
+            that contain any of these characters: <literal>'`'</literal>
+            GRAVE ACCENT, <literal>'['</literal> LEFT SQUARE BRACKET,
+            <literal>'\'</literal> REVERSE SOLIDUS,
+            <literal>']'</literal> RIGHT SQUARE BRACKET,
+            <literal>'~'</literal> TILDE
+          </para>
+
+          <para>
+            Affected tables can be detected by
+            <literal role="stmt" condition="check-table">CHECK TABLE ...
+            FOR UPGRADE</literal> as of MySQL 5.1.29, 5.4.0 (see
+            Bug#39585).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            MySQL 5.1.24 (Bug#27877)
+          </para>
+
+          <para>
+            Affects indexes that use the
+            <literal>utf8_general_ci</literal> or
+            <literal>ucs2_general_ci</literal> collation for columns
+            that contain <literal>'ß'</literal> LATIN SMALL LETTER
+            SHARP S (German).
+          </para>
+
+          <para>
+            Affected tables can be detected by
+            <literal role="stmt" condition="check-table">CHECK TABLE ...
+            FOR UPGRADE</literal> as of MySQL 5.1.30, 5.4.0 (see
+            Bug#40053).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            MySQL 5.4.0 (Bug#27877)
+          </para>
+
+          <para>
+            Affects indexes that use the
+            <literal>utf8_general_ci</literal> or
+            <literal>ucs2_general_ci</literal> collation for columns
+            that contain <literal>'ß'</literal> LATIN SMALL LETTER
+            SHARP S (German).
+          </para>
+
+          <para>
+            Affected tables can be detected by
+            <literal role="stmt" condition="check-table">CHECK TABLE ...
+            FOR UPGRADE</literal> as of MySQL 5.4.0 (see Bug#40053).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            MySQL 5.4.4 (WL#3664)
+          </para>
+
+          <para>
+            Affects indexes that use the
+            <literal>latin2_czech_cs</literal> collation.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Affected tables can be detected by
+            <literal role="stmt" condition="check-table">CHECK TABLE ...
+            FOR UPGRADE</literal> as of MySQL 5.4.4 (see Bug#40054).
+          </para>
+
+          <para>
+            MySQL 5.4.4 (Bug#33452)
+          </para>
+
+          <para>
+            Affects indexes that use the
+            <literal>latin2_czech_cs</literal> collation.
+          </para>
+
+          <para>
+            Affected tables can be detected by
+            <literal role="stmt" condition="check-table">CHECK TABLE ...
+            FOR UPGRADE</literal> as of MySQL 5.4.4 (see Bug#40054).
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            MySQL 5.4.4 (Bug#25420)
+          </para>
+
+          <para>
+            Affects indexes for columns that use the following
+            collations, if the columns contain the indicated characters:
+            <literal>big5_chinese_ci</literal>: <literal>'~'</literal>
+            TILDE or <literal>'`'</literal> GRAVE ACCENT;
+            <literal>cp866_general_ci</literal>: <literal>j</literal>
+            LATIN SMALL LETTER J; <literal>gb2312_chinese_ci</literal>:
+            <literal>'~'</literal> TILDE;
+            <literal>gbk_chinese_ci</literal>: <literal>'~'</literal>
+            TILDE
+          </para>
+
+          <para>
+            Affected tables can be detected by
+            <literal role="stmt" condition="check-table">CHECK TABLE ...
+            FOR UPGRADE</literal> as of MySQL 5.4.4 (see Bug#40054).
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+    </section>
+
+    <section id="rebuilding-tables">
+
+      <title>Rebuilding or Repairing Tables or Indexes</title>
+
+      <indexterm>
+        <primary>table</primary>
+        <secondary>rebuilding</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>index</primary>
+        <secondary>rebuilding</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>table</primary>
+        <secondary>repair</secondary>
+      </indexterm>
+
+      <para>
+        This section describes how to rebuild a table. This can be
+        necessitated by changes to MySQL such as how data types are
+        handled or changes to character set handling. For example, an
+        error in a collation might have been corrected, necessitating a
+        table rebuild to rebuild the indexes for character columns that
+        use the collation. It might also be that a table repair or
+        upgrade should be done as indicated by a table check operation
+        such as that performed by <literal>CHECK TABLE</literal>,
+        <command>mysqlcheck</command>, or
+        <command>mysql_upgrade</command>.
+      </para>
+
+      <para>
+        Methods for rebuilding a table include dumping and reloading it,
+        or using <literal role="stmt">ALTER TABLE</literal> or
+        <literal role="stmt">REPAIR TABLE</literal>.
+      </para>
+
+      <note>
+        <para>
+          If you are rebuilding tables because a different version of
+          MySQL will not handle them after a binary upgrade or
+          downgrade, you must use the dump-and-reload method. Dump the
+          tables <emphasis>before</emphasis> upgrading or downgrading
+          (using your original version of MySQL), and reload the tables
+          <emphasis>after</emphasis> upgrading or downgrading (after
+          installing the new version).
+        </para>
+
+        <para>
+          If you use the dump-and-reload method of rebuilding tables
+          only for the purpose of rebuilding indexes, you can perform
+          the dump either before or after upgrading or downgrading.
+          Reloading still must be done afterward.
+        </para>
+      </note>
+
+      <para>
+        To re-create a table by dumping and reloading it, use
+        <command>mysqldump</command> to create a dump file and
+        <command>mysql</command> to reload the file:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqldump <replaceable>db_name</replaceable> t1 &gt; dump.sql</userinput>
+shell&gt; <userinput>mysql <replaceable>db_name</replaceable> &lt; dump.sql</userinput>
+</programlisting>
+
+      <para>
+        To recreate all the tables in a single database, specify the
+        database name without any following table name:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqldump <replaceable>db_name</replaceable> &gt; dump.sql</userinput>
+shell&gt; <userinput>mysql <replaceable>db_name</replaceable> &lt; dump.sql</userinput>
+</programlisting>
+
+      <para>
+        To recreate all tables in all databases, use the
+        <option role="mysqldump">--all-databases</option> option:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqldump --all-databases &gt; dump.sql</userinput>
+shell&gt; <userinput>mysql &lt; dump.sql</userinput>
+</programlisting>
+
+      <para>
+        To rebuild a table with <literal role="stmt">ALTER
+        TABLE</literal>, use a statement that <quote>changes</quote> the
+        table to use the storage engine that it already has. For
+        example, if <literal>t1</literal> is a <literal>MyISAM</literal>
+        table, use this statement:
+      </para>
+
+<programlisting>
+mysql&gt; <userinput>ALTER TABLE t1 ENGINE = MyISAM;</userinput>
+</programlisting>
+
+      <para>
+        If you are not sure which storage engine to specify in the
+        <literal role="stmt">ALTER TABLE</literal> statement, use
+        <literal role="stmt">SHOW CREATE TABLE</literal> to display the
+        table definition.
+      </para>
+
+      <para>
+        If you must rebuild a table because a table checking operation
+        indicates that the table is corrupt or needs an upgrade, you can
+        use <literal role="stmt">REPAIR TABLE</literal> if that
+        statement supports the table's storage engine. For example, to
+        repair a <literal>MyISAM</literal> table, use this statement:
+      </para>
+
+<programlisting>
+mysql&gt; <userinput>REPAIR TABLE t1;</userinput>
+</programlisting>
+
+      <para>
+        For storage engines such as <literal>InnoDB</literal> that
+        <literal role="stmt">REPAIR TABLE</literal> does not support,
+        use <command>mysqldump</command> to create a dump file and
+        <command>mysql</command> to reload the file, as described
+        earlier.
+      </para>
+
+      <para>
+        For specifics about which storage engines
+        <literal role="stmt">REPAIR TABLE</literal> supports, see
+        <xref linkend="repair-table"/>.
+      </para>
+
+    </section>
+
+    <section id="copying-databases">
+
+      <title>Copying MySQL Databases to Another Machine</title>
+
+      <indexterm>
+        <primary>upgrading</primary>
+        <secondary>different architecture</secondary>
+      </indexterm>
+
+      <indexterm>
+        <primary>copying databases</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>databases</primary>
+        <secondary>copying</secondary>
+      </indexterm>
+
+      <para>
+        You can copy the <filename>.frm</filename>,
+        <filename>.MYI</filename>, and <filename>.MYD</filename> files
+        for <literal>MyISAM</literal> tables between different
+        architectures that support the same floating-point format.
+        (MySQL takes care of any byte-swapping issues.) See
+        <xref linkend="myisam-storage-engine"/>.
+      </para>
+
+      <para>
+        In cases where you need to transfer databases between different
+        architectures, you can use <command>mysqldump</command> to
+        create a file containing SQL statements. You can then transfer
+        the file to the other machine and feed it as input to the
+        <command>mysql</command> client.
+      </para>
+
+      <para>
+        Use <command>mysqldump --help</command> to see what options are
+        available.
+      </para>
+
+      <para>
+        The easiest (although not the fastest) way to move a database
+        between two machines is to run the following commands on the
+        machine on which the database is located:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqladmin -h '<replaceable>other_hostname</replaceable>' create <replaceable>db_name</replaceable></userinput>
+shell&gt; <userinput>mysqldump <replaceable>db_name</replaceable> | mysql -h '<replaceable>other_hostname</replaceable>' <replaceable>db_name</replaceable></userinput>
+</programlisting>
+
+      <remark role="todo">
+        next example not only changes copy direction (from
+        local-&gt;remote to remote-&gt;local), it adds -compress. But
+        -compress is a separate thing and can be used no matter the copy
+        direction. Split into two examples.
+      </remark>
+
+      <para>
+        If you want to copy a database from a remote machine over a slow
+        network, you can use these commands:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqladmin create <replaceable>db_name</replaceable></userinput>
+shell&gt; <userinput>mysqldump -h '<replaceable>other_hostname</replaceable>' --compress <replaceable>db_name</replaceable> | mysql <replaceable>db_name</replaceable></userinput>
+</programlisting>
+
+      <para>
+        You can also store the dump in a file, transfer the file to the
+        target machine, and then load the file into the database there.
+        For example, you can dump a database to a compressed file on the
+        source machine like this:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqldump --quick <replaceable>db_name</replaceable> | gzip &gt; <replaceable>db_name</replaceable>.gz</userinput>
+</programlisting>
+
+      <para>
+        Transfer the file containing the database contents to the target
+        machine and run these commands there:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqladmin create <replaceable>db_name</replaceable></userinput>
+shell&gt; <userinput>gunzip &lt; <replaceable>db_name</replaceable>.gz | mysql <replaceable>db_name</replaceable></userinput>
+</programlisting>
+
+      <indexterm>
+        <primary>mysqldump</primary>
+      </indexterm>
+
+      <indexterm>
+        <primary>mysqlimport</primary>
+      </indexterm>
+
+      <para>
+        You can also use <command>mysqldump</command> and
+        <command>mysqlimport</command> to transfer the database. For
+        large tables, this is much faster than simply using
+        <command>mysqldump</command>. In the following commands,
+        <replaceable>DUMPDIR</replaceable> represents the full path name
+        of the directory you use to store the output from
+        <command>mysqldump</command>.
+      </para>
+
+      <para>
+        First, create the directory for the output files and dump the
+        database:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mkdir <replaceable>DUMPDIR</replaceable></userinput>
+shell&gt; <userinput>mysqldump --tab=<replaceable>DUMPDIR</replaceable> <replaceable>db_name</replaceable></userinput>
+</programlisting>
+
+      <para>
+        Then transfer the files in the
+        <replaceable>DUMPDIR</replaceable> directory to some
+        corresponding directory on the target machine and load the files
+        into MySQL there:
+      </para>
+
+<programlisting>
+shell&gt; <userinput>mysqladmin create <replaceable>db_name</replaceable>           # create database</userinput>
+shell&gt; <userinput>cat <replaceable>DUMPDIR</replaceable>/*.sql | mysql <replaceable>db_name</replaceable>   # create tables in database</userinput>
+shell&gt; <userinput>mysqlimport <replaceable>db_name</replaceable> <replaceable>DUMPDIR</replaceable>/*.txt   # load data into tables</userinput>
+</programlisting>
+
+      <para>
+        Do not forget to copy the <literal>mysql</literal> database
+        because that is where the grant tables are stored. You might
+        have to run commands as the MySQL <literal>root</literal> user
+        on the new machine until you have the <literal>mysql</literal>
+        database in place.
+      </para>
+
+      <para>
+        After you import the <literal>mysql</literal> database on the
+        new machine, execute <command>mysqladmin
+        flush-privileges</command> so that the server reloads the grant
+        table information.
+      </para>
+
+    </section>
+
+  </section>


Added: trunk/refman-5.1/installing-windows.xml
===================================================================
--- trunk/refman-5.1/installing.xml	                        (rev 0)
+++ trunk/refman-5.1/installing.xml	2009-09-30 14:59:03 UTC (rev 16871)
Changed blocks: 2, Lines Added: 3326, Lines Deleted: 1; 124350 bytes

@@ -0,0 +1,3169 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section 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;
+]>
+<section id="windows-installation">
+
+    <title>Installing MySQL on Windows</title>
+
+    <para>
+      A native Windows distribution of MySQL has been available since
+      version 3.21 and represents a sizable percentage of the daily
+      downloads of MySQL. This section describes the process for
+      installing MySQL on Windows.
+    </para>
+
+    <para>
+      To run MySQL on Windows, you need the following:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          A Windows operating system such as Windows 2000, Windows XP,
+          Windows Vista, Windows Server 2003, or Windows Server 2008.
+          Both 32-bit and 64-bit versions are supported.
+        </para>
+
+        <para>
+          A Windows operating system permits you to run the MySQL server
+          as a service. See <xref linkend="windows-start-service"/>.
+        </para>
+
+        <para>
+          Generally, you should install MySQL on Windows using an
+          account that has administrator rights. Otherwise, you may
+          encounter problems with certain operations such as editing the
+          <literal>PATH</literal> environment variable or accessing the
+          <command>Service Control Manager</command>. Once installed,
+          MySQL does not need to be executed using a user with
+          Administrator privileges.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          TCP/IP protocol support.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Enough space on the hard drive to unpack, install, and create
+          the databases in accordance with your requirements (generally
+          a minimum of 200 megabytes is recommended.)
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
+      For a list of limitations within the Windows version of MySQL, see
+      <xref linkend="limits-windows"/>.
+    </para>
+
+    <para>
+      There may also be other requirements, depending on how you plan to
+      use MySQL:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          If you plan to connect to the MySQL server via ODBC, you need
+          a Connector/ODBC driver. See <xref linkend="connector-odbc"/>.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          If you plan to use MySQL server with ADO.NET applications, you
+          need the Connector/NET driver. See
+          <xref linkend="connector-net"/>.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          If you need tables with a size larger than 4GB, install MySQL
+          on an NTFS or newer file system. Don't forget to use
+          <literal>MAX_ROWS</literal> and
+          <literal>AVG_ROW_LENGTH</literal> when you create tables. See
+          <xref linkend="create-table"/>.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
+      MySQL for Windows is available in several distribution formats:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          Binary distributions are available that contain a setup
+          program that installs everything you need so that you can
+          start the server immediately. Another binary distribution
+          format contains an archive that you simply unpack in the
+          installation location and then configure yourself. For
+          details, see <xref linkend="windows-choosing-package"/>.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          The source distribution contains all the code and support
+          files for building the executables using the Visual Studio
+          compiler system.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
+      Generally speaking, you should use a binary distribution that
+      includes an installer. It is simpler to use than the others, and
+      you need no additional tools to get MySQL up and running. The
+      installer for the Windows version of MySQL, combined with a GUI
+      Configuration Wizard, automatically installs MySQL, creates an
+      option file, starts the server, and secures the default user
+      accounts.
+    </para>
+
+    <caution>
+      <para>
+        Using virus scanning software such as Norton/Symantec Anti-Virus
+        on directories containing MySQL data and temporary tables can
+        cause issues, both in terms of the performance of MySQL and the
+        virus-scanning software mis-identifying the contents of the
+        files as containing spam. This is because of the fingerprinting
+        mechanism used by the virus scanning software, and the way in
+        which MySQL rapidly updates different files, which may be
+        identified as a potential security risk.
+      </para>
+
+      <para>
+        After installing MySQL Server, it is recommended that you
+        disable virus scanning on the main directory
+        (<literal role="sysvar">datadir</literal>) being used to store
+        your MySQL table data. There is usually a system built into the
+        virus scanning software to allow certain directories to be
+        specifically ignored during virus scanning.
+      </para>
+
+      <para>
+        In addition, by default, MySQL creates temporary files in the
+        standard Windows temporary directory. To prevent the temporary
+        files also being scanned, you should configure a separate
+        temporary directory for MySQL temporary files and add this to
+        the virus scanning exclusion list. To do this, add a
+        configuration option for the
+        <option role="mysqld">tmpdir</option> parameter to your
+        <filename>my.ini</filename> configuration file. For more
+        information, see <xref linkend="windows-create-option-file"/>.
+      </para>
+    </caution>
+
+    <para>
+      The following section describes how to install MySQL on Windows
+      using a binary distribution. To use an installation package that
+      does not include an installer, follow the procedure described in
+      <xref linkend="windows-install-archive"/>. To install using a
+      source distribution, see <xref linkend="windows-source-build"/>.
+    </para>
+
+    <para>
+      MySQL distributions for Windows can be downloaded from
+      <ulink url="&base-url-downloads;"/>. See
+      <xref linkend="getting-mysql"/>.
+    </para>
+
+    <section id="windows-choosing-package">
+
+      <title>Choosing An Installation Package</title>
+
+      <para>
+        For MySQL &current-series;, there are three installation
+        packages to choose from when installing MySQL on Windows:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            <emphasis role="bold">The Essentials Package</emphasis>:
+            This package has a file name similar to
+            <filename>mysql-essential-&current-version;-win32.msi</filename>
+            and contains the minimum set of files needed to install
+            MySQL on Windows, including the Configuration Wizard. This
+            package does not include optional components such as the
+            embedded server and benchmark suite.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <emphasis role="bold">The Complete Package</emphasis>: This
+            package has a file name similar to
+            <filename>mysql-&current-version;-win32.zip</filename> and
+            contains all files needed for a complete Windows
+            installation, including the Configuration Wizard. This
+            package includes optional components such as the embedded
+            server and benchmark suite.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <emphasis role="bold">The Noinstall Archive</emphasis>: This
+            package has a file name similar to
+            <filename>mysql-noinstall-&current-version;-win32.zip</filename>
+            and contains all the files found in the Complete install
+            package, with the exception of the Configuration Wizard.
+            This package does not include an automated installer, and
+            must be manually installed and configured.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        The Essentials package is recommended for most users. Both the
+        Essentials and Complete distributions are available as an
+        <filename>.msi</filename> file for use with the Windows
+        Installer. The Noinstall distribution is packaged as Zip
+        archives. To use Zip archives, you must have a tool that can
+        unpack <filename>.zip</filename> files.
+      </para>
+
+      <para>
+        Your choice of install package affects the installation process
+        you must follow. If you choose to install either the Essentials
+        or Complete install packages, see
+        <xref linkend="windows-using-installer"/>. If you choose to
+        install MySQL from the Noinstall archive, see
+        <xref linkend="windows-install-archive"/>.
+      </para>
+
+    </section>
+
+    <section id="windows-using-installer">
+
+      <title>Installing MySQL with the Automated Installer</title>
+
+      <para>
+        New MySQL users can use the MySQL Installation Wizard and MySQL
+        Configuration Wizard to install MySQL on Windows. These are
+        designed to install and configure MySQL in such a way that new
+        users can immediately get started using MySQL.
+      </para>
+
+      <para>
+        The MySQL Installation Wizard and MySQL Configuration Wizard are
+        available in the Essentials and Complete install packages. They
+        are recommended for most standard MySQL installations.
+        Exceptions include users who need to install multiple instances
+        of MySQL on a single server host and advanced users who want
+        complete control of server configuration.
+      </para>
+
+    </section>
+
+    <section id="windows-install-wizard">
+
+      <title>Using the MySQL Installation Wizard</title>
+
+      <para>
+        MySQL Installation Wizard is an installer for the MySQL server
+        that uses the latest installer technologies for Microsoft
+        Windows. The MySQL Installation Wizard, in combination with the
+        MySQL Configuration Wizard, allows a user to install and
+        configure a MySQL server that is ready for use immediately after
+        installation.
+      </para>
+
+      <para>
+        The MySQL Installation Wizard is the standard installer for all
+        MySQL server distributions, version 4.1.5 and higher. Users of
+        previous versions of MySQL need to shut down and remove their
+        existing MySQL installations manually before installing MySQL
+        with the MySQL Installation Wizard. See
+        <xref linkend="mysql-install-wizard-upgrading"/>, for more
+        information on upgrading from a previous version.
+      </para>
+
+      <para>
+        Microsoft has included an improved version of their Microsoft
+        Windows Installer (MSI) in the recent versions of Windows. MSI
+        has become the de-facto standard for application installations
+        on Windows 2000, Windows XP, and Windows Server 2003. The MySQL
+        Installation Wizard makes use of this technology to provide a
+        smoother and more flexible installation process.
+      </para>
+
+      <para>
+        The Microsoft Windows Installer Engine was updated with the
+        release of Windows XP; those using a previous version of Windows
+        can reference
+        <ulink url="http://support.microsoft.com/default.aspx?scid=kb;EN-US;292539">this
+        Microsoft Knowledge Base article</ulink> for information on
+        upgrading to the latest version of the Windows Installer Engine.
+      </para>
+
+      <para>
+        In addition, Microsoft has introduced the WiX (Windows Installer
+        XML) toolkit recently. This is the first highly acknowledged
+        Open Source project from Microsoft. We have switched to WiX
+        because it is an Open Source project and it allows us to handle
+        the complete Windows installation process in a flexible manner
+        using scripts.
+      </para>
+
+      <para>
+        Improving the MySQL Installation Wizard depends on the support
+        and feedback of users like you. If you find that the MySQL
+        Installation Wizard is lacking some feature important to you, or
+        if you discover a bug, please report it in our bugs database
+        using the instructions given in <xref linkend="bug-reports"/>.
+      </para>
+
+      <section id="mysql-install-wizard-starting">
+
+        <title>Downloading and Starting the MySQL Installation Wizard</title>
+
+        <para>
+          The MySQL installation packages can be downloaded from
+          <ulink url="&base-url-downloads;"/>. If the package you
+          download is contained within a Zip archive, you need to
+          extract the archive first.
+        </para>
+
+        <note>
+          <para>
+            If you are installing on Windows Vista it is best to open a
+            network port before beginning the installation. To do this,
+            first ensure that you are logged in as an Administrator, go
+            to the <literal>Control Panel</literal>, and double click
+            the <literal>Windows Firewall</literal> icon. Choose the
+            <literal>Allow a program through Windows Firewall</literal>
+            option and click the <guibutton>Add port</guibutton> button.
+            Enter <literal>MySQL</literal> into the
+            <guilabel>Name</guilabel> text box and
+            <literal>3306</literal> (or the port of your choice) into
+            the <guilabel>Port number</guilabel> text box. Also ensure
+            that the <guilabel>TCP</guilabel> protocol radio button is
+            selected. If you wish, you can also limit access to the
+            MySQL server by choosing the <guilabel>Change
+            scope</guilabel> button. Confirm your choices by clicking
+            the <guibutton>OK</guibutton> button. If you do not open a
+            port prior to installation, you cannot configure the MySQL
+            server immediately after installation. Additionally, when
+            running the MySQL Installation Wizard on Windows Vista,
+            ensure that you are logged in as a user with administrative
+            rights.
+          </para>
+        </note>
+
+        <para>
+          The process for starting the wizard depends on the contents of
+          the installation package you download. If there is a
+          <filename>setup.exe</filename> file present, double-click it
+          to start the installation process. If there is an
+          <filename>.msi</filename> file present, double-click it to
+          start the installation process.
+        </para>
+
+      </section>
+
+      <section id="mysql-install-wizard-install-type">
+
+        <title>Choosing an Install Type</title>
+
+        <para>
+          There are three installation types available:
+          <emphasis role="bold">Typical</emphasis>,
+          <emphasis role="bold">Complete</emphasis>, and
+          <emphasis role="bold">Custom</emphasis>.
+        </para>
+
+        <para>
+          The <emphasis role="bold">Typical</emphasis> installation type
+          installs the MySQL server, the <command>mysql</command>
+          command-line client, and the command-line utilities. The
+          command-line clients and utilities include
+          <command>mysqldump</command>, <command>myisamchk</command>,
+          and several other tools to help you manage the MySQL server.
+        </para>
+
+        <para>
+          The <emphasis role="bold">Complete</emphasis> installation
+          type installs all components included in the installation
+          package. The full installation package includes components
+          such as the embedded server library, the benchmark suite,
+          support scripts, and documentation.
+        </para>
+
+        <para>
+          The <emphasis role="bold">Custom</emphasis> installation type
+          gives you complete control over which packages you wish to
+          install and the installation path that is used. See
+          <xref linkend="mysql-install-wizard-custom-install"/>, for
+          more information on performing a custom install.
+        </para>
+
+        <para>
+          If you choose the <emphasis role="bold">Typical</emphasis> or
+          <emphasis role="bold">Complete</emphasis> installation types
+          and click the <guibutton>Next</guibutton> button, you advance
+          to the confirmation screen to verify your choices and begin
+          the installation. If you choose the
+          <emphasis role="bold">Custom</emphasis> installation type and
+          click the <guibutton>Next</guibutton> button, you advance to
+          the custom installation dialog, described in
+          <xref linkend="mysql-install-wizard-custom-install"/>.
+        </para>
+
+      </section>
+
+      <section id="mysql-install-wizard-custom-install">
+
+        <title>The Custom Install Dialog</title>
+
+        <para>
+          If you wish to change the installation path or the specific
+          components that are installed by the MySQL Installation
+          Wizard, choose the <emphasis role="bold">Custom</emphasis>
+          installation type.
+        </para>
+
+        <para>
+          A tree view on the left side of the custom install dialog
+          lists all available components. Components that are not
+          installed have a red <guiicon>X</guiicon> icon; components
+          that are installed have a gray icon. To change whether a
+          component is installed, click on that component's icon and
+          choose a new option from the drop-down list that appears.
+        </para>
+
+        <para>
+          You can change the default installation path by clicking the
+          <guibutton>Change...</guibutton> button to the right of the
+          displayed installation path.
+        </para>
+
+        <para>
+          After choosing your installation components and installation
+          path, click the <guibutton>Next</guibutton> button to advance
+          to the confirmation dialog.
+        </para>
+
+      </section>
+
+      <section id="mysql-install-wizard-confirmation-dialog">
+
+        <title>The Confirmation Dialog</title>
+
+        <para>
+          Once you choose an installation type and optionally choose
+          your installation components, you advance to the confirmation
+          dialog. Your installation type and installation path are
+          displayed for you to review.
+        </para>
+
+        <para>
+          To install MySQL if you are satisfied with your settings,
+          click the <guibutton>Install</guibutton> button. To change
+          your settings, click the <guibutton>Back</guibutton> button.
+          To exit the MySQL Installation Wizard without installing
+          MySQL, click the <guibutton>Cancel</guibutton> button.
+        </para>
+
+        <para>
+          After installation is complete, you have the option of
+          registering with the MySQL web site. Registration gives you
+          access to post in the MySQL forums at
+          <ulink url="http://forums.mysql.com">forums.mysql.com</ulink>,
+          along with the ability to report bugs at
+          <ulink url="http://bugs.mysql.com">bugs.mysql.com</ulink> and
+          to subscribe to our newsletter. The final screen of the
+          installer provides a summary of the installation and gives you
+          the option to launch the MySQL Configuration Wizard, which you
+          can use to create a configuration file, install the MySQL
+          service, and configure security settings.
+        </para>
+
+      </section>
+
+      <section id="mysql-install-wizard-changes">
+
+        <title>Changes Made by MySQL Installation Wizard</title>
+
+        <para>
+          Once you click the <guibutton>Install</guibutton> button, the
+          MySQL Installation Wizard begins the installation process and
+          makes certain changes to your system which are described in
+          the sections that follow.
+        </para>
+
+        <para>
+          <emphasis role="bold">Changes to the Registry</emphasis>
+        </para>
+
+        <para>
+          The MySQL Installation Wizard creates one Windows registry key
+          in a typical install situation, located in
+          <literal>HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB</literal>.
+        </para>
+
+        <para>
+          The MySQL Installation Wizard creates a key named after the
+          major version of the server that is being installed, such as
+          <literal>MySQL Server &current-series;</literal>. It contains
+          two string values, <literal>Location</literal> and
+          <literal>Version</literal>. The <literal>Location</literal>
+          string contains the path to the installation directory. In a
+          default installation it contains <literal>C:\Program
+          Files\MySQL\MySQL Server &current-series;\</literal>. The
+          <literal>Version</literal> string contains the release number.
+          For example, for an installation of MySQL Server
+          &current-version;, the key contains a value of
+          <literal>&current-version;</literal>.
+        </para>
+
+        <para>
+          These registry keys are used to help external tools identify
+          the installed location of the MySQL server, preventing a
+          complete scan of the hard-disk to determine the installation
+          path of the MySQL server. The registry keys are not required
+          to run the server, and if you install MySQL using the
+          <literal>noinstall</literal> Zip archive, the registry keys
+          are not created.
+        </para>
+
+        <para>
+          <emphasis role="bold">Changes to the Start Menu</emphasis>
+        </para>
+
+        <para>
+          The MySQL Installation Wizard creates a new entry in the
+          Windows <guimenu>Start</guimenu> menu under a common MySQL
+          menu heading named after the major version of MySQL that you
+          have installed. For example, if you install MySQL
+          &current-series;, the MySQL Installation Wizard creates a
+          <guisubmenu>MySQL Server &current-series;</guisubmenu> section
+          in the <guimenu>Start</guimenu> menu.
+        </para>
+
+        <para>
+          The following entries are created within the new
+          <guimenu>Start</guimenu> menu section:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <guimenuitem>MySQL Command Line Client</guimenuitem>: This
+              is a shortcut to the <command>mysql</command> command-line
+              client and is configured to connect as the
+              <literal>root</literal> user. The shortcut prompts for a
+              <literal>root</literal> user password when you connect.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <guimenuitem>MySQL Server Instance Config
+              Wizard</guimenuitem>: This is a shortcut to the MySQL
+              Configuration Wizard. Use this shortcut to configure a
+              newly installed server, or to reconfigure an existing
+              server.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              <guimenuitem>MySQL Documentation</guimenuitem>: This is a
+              link to the MySQL server documentation that is stored
+              locally in the MySQL server installation directory. This
+              option is not available when the MySQL server is installed
+              using the Essentials installation package.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          <emphasis role="bold">Changes to the File System</emphasis>
+        </para>
+
+        <para>
+          The MySQL Installation Wizard by default installs the MySQL
+          &current-series; server to <filename>C:\<replaceable>Program
+          Files</replaceable>\MySQL\MySQL Server
+          <replaceable>&current-series;</replaceable></filename>, where
+          <replaceable>Program Files</replaceable> is the default
+          location for applications in your system, and
+          <replaceable>&current-series;</replaceable> is the major
+          version of your MySQL server. This is the recommended location
+          for the MySQL server, replacing the former default location
+          <filename>C:\mysql</filename>.
+        </para>
+
+        <para>
+          By default, all MySQL applications are stored in a common
+          directory at <filename>C:\<replaceable>Program
+          Files</replaceable>\MySQL</filename>, where
+          <replaceable>Program Files</replaceable> is the default
+          location for applications in your Windows installation. A
+          typical MySQL installation on a developer machine might look
+          like this:
+        </para>
+
+<programlisting>
+C:\Program Files\MySQL\MySQL Server &current-series;
+C:\Program Files\MySQL\MySQL Workbench 5.1 OSS
+</programlisting>
+
+        <para>
+          This approach makes it easier to manage and maintain all MySQL
+          applications installed on a particular system.
+        </para>
+
+        <para>
+          In MySQL 5.1.23 and earlier, the default location for the data
+          files used by MySQL is located within the corresponding MySQL
+          Server installation directory. For MySQL 5.1.24 and later, the
+          default location of the data directory is the
+          <filename>AppData</filename> directory configured for the user
+          that installed the MySQL application.
+        </para>
+
+      </section>
+
+      <section id="mysql-install-wizard-upgrading">
+
+        <title>Upgrading MySQL with the Installation Wizard</title>
+
+        <para>
+          The MySQL Installation Wizard can perform server upgrades
+          automatically using the upgrade capabilities of MSI. That
+          means you do not need to remove a previous installation
+          manually before installing a new release. The installer
+          automatically shuts down and removes the previous MySQL
+          service before installing the new version.
+        </para>
+
+        <para>
+          Automatic upgrades are available only when upgrading between
+          installations that have the same major and minor version
+          numbers. For example, you can upgrade automatically from MySQL
+          5.1.34 to MySQL 5.1.37, but not from MySQL &previous-series; to
+          MySQL &current-series;.
+        </para>
+
+        <para>
+          See <xref linkend="windows-upgrading"/>.
+        </para>
+
+      </section>
+
+    </section>
+
+    <section id="mysql-config-wizard">
+
+      <title>MySQL Server Instance Configuration Wizard</title>
+
+      <para>
+        The MySQL Server Instance Configuration Wizard helps automate
+        the process of configuring your server. It creates a custom
+        MySQL configuration file (<filename>my.ini</filename> or
+        <filename>my.cnf</filename>) by asking you a series of questions
+        and then applying your responses to a template to generate the
+        configuration file that is tuned to your installation.
+      </para>
+
+      <para>
+        The MySQL Server Instance Configuration Wizard is included with
+        the MySQL &current-series; server. The MySQL Server Instance
+        Configuration Wizard is only available for Windows.
+      </para>
+
+      <section id="mysql-config-wizard-starting">
+
+        <title>Starting the MySQL Server Instance Configuration Wizard</title>
+
+        <para>
+          The MySQL Server Instance Configuration Wizard is normally
+          started as part of the installation process. You should only
+          need to run the MySQL Server Instance Configuration Wizard
+          again when you need to change the configuration parameters of
+          your server.
+        </para>
+
+        <para>
+          If you chose not to open a port prior to installing MySQL on
+          Windows Vista, you can choose to use the MySQL Server
+          Configuration Wizard after installation. However, you must
+          open a port in the Windows Firewall. To do this see the
+          instructions given in
+          <xref linkend="mysql-install-wizard-starting"/>. Rather than
+          opening a port, you also have the option of adding MySQL as a
+          program that bypasses the Windows Firewall. One or the other
+          option is sufficient &mdash; you need not do both.
+          Additionally, when running the MySQL Server Configuration
+          Wizard on Windows Vista ensure that you are logged in as a
+          user with administrative rights.
+        </para>
+
+        <mediaobject>
+          <imageobject>
+            <imagedata contentwidth="584" contentdepth="466" fileref="images/published/mysql-cfg-fig1.png" format="PNG"/>
+          </imageobject>
+          <textobject>
+            <phrase lang="en">MySQL Server Instance Configuration
+            Wizard</phrase>
+          </textobject>
+        </mediaobject>
+
+        <para>
+          You can launch the MySQL Configuration Wizard by clicking the
+          <guimenuitem>MySQL Server Instance Config Wizard</guimenuitem>
+          entry in the <guisubmenu>MySQL</guisubmenu> section of the
+          Windows <guimenu>Start</guimenu> menu.
+        </para>
+
+        <para>
+          Alternatively, you can navigate to the
+          <filename>bin</filename> directory of your MySQL installation
+          and launch the <filename>MySQLInstanceConfig.exe</filename>
+          file directly.
+        </para>
+
+        <para>
+          The MySQL Ser