Author: plavin
Date: 2007-03-23 16:59:56 +0100 (Fri, 23 Mar 2007)
New Revision: 5528
Log:
Add another section
Modified:
trunk/userguide/excel-mysql.xml
Modified: trunk/userguide/excel-mysql.xml
===================================================================
--- trunk/userguide/excel-mysql.xml 2007-03-23 15:52:09 UTC (rev 5527)
+++ trunk/userguide/excel-mysql.xml 2007-03-23 15:59:56 UTC (rev 5528)
Changed blocks: 3, Lines Added: 62, Lines Deleted: 5; 3768 bytes
@@ -868,8 +868,8 @@
<para>
There are also various other ways of querying your records to
verify the data. For example, if all certification numbers in the
- member accreditations table are meant to be unique,
- executing the following query confirms this:
+ member accreditations table are meant to be unique, executing the
+ following query confirms this:
</para>
<programlisting>
@@ -883,8 +883,8 @@
If you notice discrepancies in the data and wish to update records
you can also do this from within Query Browser. Click the
<guibutton>Start Editing</guibutton> button and then select the
- record you wish to change and place the cursor in the
- column you wish to change.
+ record you wish to change and place the cursor in the column you
+ wish to change.
</para>
<note>
@@ -901,8 +901,65 @@
<title>The Production Database</title>
- <para></para>
+ <para>
+ Once you are convinced of the validity of your data, you can move
+ the tables to your production server. We'll do that by first using
+ the <literal>mysqldump</literal> utility. To export only the final
+ versions of the tables, go to the command line and type:
+ </para>
+<programlisting>
+shell> <command>mysqldump</command> <option>-u</option> peter <option>-p</option> spreadsheet members memberaccreditations accreditations > newdb.sql
+</programlisting>
+
+ <para>
+ The <literal>mysqldump</literal> utility takes many of the same
+ switches as the MySQL client; as you can see, you specify your user name and
+ password in the same way. You also need to specify the
+ database name and the tables you wish to dump. In this case, the
+ output is redirected to a script file named
+ <literal>newdb.sql</literal>.
+ </para>
+
+ <para>
+ Have a look at the contents of the script file so that you
+ understand what it does. Any existing tables with the specified
+ table names will be dropped and recreated and then the data will
+ be inserted. You may want to back up your data before running the script file.
+ You'll notice that no database is created so don't
+ forget to create a database before transferring these tables to
+ you production server.
+ </para>
+
+ <note>
+ <para>
+ It is possible to create a database using this utility. For more
+ information about the many options available with
+ <literal>mysqldump</literal> see
+ <ulink url="&base-url-docs;5.0/en/mysqldump.html"></ulink>.
+ </para>
+ </note>
+
+ <para>
+ How you execute the dump script file depends upon how you access
+ your production MySQL server. If you have direct access to the
+ server or access through ssh, transfer the script file to the
+ machine hosting the server, and then issue the command:
+ </para>
+
+<programlisting>
+shell> <command>mysql</command> <option>-u</option> <replaceable>peter</replaceable> -p <replaceable>dbname</replaceable> < newdb.sql
+</programlisting>
+
+ <para>
+ If you have remote access to your production server simply add
+ the <option>-h</option> option to the preceding command. You
+ may also upload your script using an application such as
+ <literal>phpMyadmin</literal>. Finally, you can open and execute
+ the script file from within Query Browser. We'll see more about
+ this in the following section.
+ </para>
+
</section>
<section id="updating-from-spreadsheet">
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r5528 - trunk/userguide | plavin | 23 Mar |