Installing and Upgrading the Database

From DLXS Documentation

(Difference between revisions)
Jump to: navigation, search
m (Upgrading across multiple database versions)
Current revision (14:35, 19 October 2010) (edit) (undo)
(Upgrading across multiple database versions)
 
(9 intermediate revisions not shown.)
Line 17: Line 17:
-
<p>After the database is created, the next step is to install the sample database data contained in [http://www.dlxs.org/products/archive-by-CDROM/13/Lib/src/misc/db/db-dump-v6.0-release.sql $DLXSROOT/misc/db/db-dump-v6.0-release.sql].</p>
+
<p>After the database is created, the next step is to install the sample database data contained in $DLXSROOT/misc/db/db-dump-vN.0-release.sql where N is the version of the database that corresponds to the release of DLXS.</p>
-
Let <tt><b>dlxs_v6</b></tt> be the database name you chose for this installation. Note that this is the database name you supplied at the prompt when you ran the Installer.  Use the <b>mysql</b> command line client to load the dump file like this:
+
Let <tt><b>dlxs_vN</b></tt> be the database name you chose for this installation. Note that this is the database name you supplied at the prompt when you ran the Installer.  Use the <b>mysql</b> command line client to load the dump file like this:
-
   % mysql -u dlxsadm -p dlxs_v6 &lt; $DLXSROOT/misc/db/db-dump-v6.0-release.sql
+
   % mysql -u dlxsadm -p dlxs_vN &lt; $DLXSROOT/misc/db/db-dump-vN.0-release.sql
That's it!
That's it!
-
   
 
==Database upgrading==
==Database upgrading==
-
If you already have a DLXS database set up for an earlier release, make a copy of it and then upgrade the copy to support the newly installed DLXS release.  
+
'''NOTE:''' Please refer to [[DLXS Database Upgrade Utility]] for this step.
-
Let's say your current database is named <tt><b>dlxs_v5</b></tt> and the new database will be named <tt><b>dlxs_v6</b></tt>. To make a copy of your current MySQL database and upgrade it:
 
-
;Step 1: dump <tt>dlxs_v5</tt> using
+
;IMPORTANT NOTE: In the upgrade process, in your shell, <tt>$DLXSROOT</tt> '''must always''' be the root of the new DLXS release (or latest) installation. All previous upgrade_M_N+1 scripts are included with each DLXS release.
-
+
-
% mysqldump -u dlxsadm -p dlxs_v5 > dlxs_v5_dump.sql
+
-
 
+
-
;Step 2: create an empty <tt>dlxs_v6</tt> database as described above in [[#MySQL configuration|MySQL configuration]]
+
-
 
+
-
;Step 3: load <tt>dlxs_v5_dump.sql</tt> into <tt>dlxs_v6</tt>
+
-
 
+
-
% mysql -u dlxsadm -p dlxs_v6 < dlxs_v5_dump.sql
+
-
 
+
-
;Step 4: upgrade the copy of <tt>dlxs_v5</tt> that you loaded into <tt>dlxs_v6</tt>
+
-
 
+
-
% $DLXSROOT/bin/db/upgrade_5_6
+
-
 
+
-
where <tt>$DLXSROOT</tt> is the root of the new DLXS release 13 installation. This means <tt>upgrade_5_6</tt> will act on the database name you supplied when you installed release 13.
+
===Upgrading across multiple database versions===
===Upgrading across multiple database versions===
-
If your existing database version is more than one version behind 6, run the <tt>$DLXSROOT/bin/db/upgrade_*</tt> scripts sequentially on the new database containing the dump of the earlier database version.
+
If your existing database version is more than one version behind, run the <tt>$DLXSROOT/bin/db/upgrade_*</tt> scripts sequentially on the new database containing the dump of the earlier database version.
-
;IMPORTANT NOTE: In this upgrade process, in your shell, <tt>$DLXSROOT</tt> '''must always''' be the root of the new DLXS release 13 installation.  All previous upgrade_* scripts are included with each DLXS release.
+
For example, if you copied <tt>dlxs_v3</tt> into <tt>dlxs_v6</tt> you would run, in order: <tt>$DLXSROOT/bin/db/upgrade_3_4, $DLXSROOT/bin/db/upgrade_4_5</tt> and finally <tt>$DLXSROOT/bin/db/upgrade_5_6</tt> all from the release 13 (or latest) install tree.   
-
 
+
-
For example, if you copied <tt>dlxs_v3</tt> into <tt>dlxs_v6</tt> you would run, in order: <tt>$DLXSROOT/bin/db/upgrade_3_4, $DLXSROOT/bin/db/upgrade_4_5</tt> and finally <tt>$DLXSROOT/bin/db/upgrade_5_6</tt> all from the release 13 install tree.   
+
 +
<div class="redtext">
;IMPORTANT NOTE when running upgrade_4_5: A file is missing from the release 13 CD and the .ISO file. In your release 13 install tree create this directory:
;IMPORTANT NOTE when running upgrade_4_5: A file is missing from the release 13 CD and the .ISO file. In your release 13 install tree create this directory:
 +
</div>
  % mkdir -p $DLXSROOT/misc/db/ImageClassSampleData/version5
  % mkdir -p $DLXSROOT/misc/db/ImageClassSampleData/version5
Line 62: Line 46:
http://www.dlxs.org/products/archive-by-CDROM/13/Lib/src/misc/db/ImageClassSampleData/version5/icsample.sql
http://www.dlxs.org/products/archive-by-CDROM/13/Lib/src/misc/db/ImageClassSampleData/version5/icsample.sql
-
 
+
===Database Versions===
-
   
+
For reference here are the DLXS release numbers and their corresponding database version numbers:
For reference here are the DLXS release numbers and their corresponding database version numbers:
<table border="1" width="30%">
<table border="1" width="30%">
Line 74: Line 57:
         <tr><td>12, 12a</td><td>5</td></tr>
         <tr><td>12, 12a</td><td>5</td></tr>
         <tr><td>13</td><td>6</td></tr>
         <tr><td>13</td><td>6</td></tr>
 +
        <tr><td>14</td><td>7</td></tr>
 +
        <tr><td>15</td><td>8</td></tr>
</table>
</table>
-
 
-
 
[[#top|Top]]
[[#top|Top]]

Current revision

Main Page > Installing DLXS > Installing and Upgrading the Database


For brand new DLXS middleware installations, create a new MySQL database following these instructions:

Contents

[edit] MySQL configuration

For DLXS installations you will use MySQL as your data store. You should execute the following commands to create an empty database, user accounts, and access permissions required for use with DLXS middleware.

  1. Start the SQL monitor with the command mysql -u root -p mysql (you will be prompted for the MySQL system password).
  2. Create the DLXS database with the command create database dlxs;. Note that you should use the database name you chose when prompted for the name of the database during DLXS middleware installation rather than simply dlxs. We suggest you should choose a name that reflects the version number of the database delivered with the middleware release or perhaps the release number of the middleware.
  3. Create the dlxsadm (administrative) account and grant full privileges to it with the command grant all privileges on dlxs.* to dlxsadm identified by 'password';, where password is the password to be used for DLXS database administration.
  4. Grant FILE privilege to the dlxsadm account with the command grant file on *.* to dlxsadm;.
  5. Create the dlxs account and grant basic privileges to it with the command grant select,insert,update,delete,references on dlxs.* to dlxs identified by 'password';, where password is the password to be used for general DLXS database usage (such as from within the DLXS middleware).
  6. Activate the changes with the command flush privileges;.
  7. Exit the SQL monitor with the command quit.


After the database is created, the next step is to install the sample database data contained in $DLXSROOT/misc/db/db-dump-vN.0-release.sql where N is the version of the database that corresponds to the release of DLXS.

Let dlxs_vN be the database name you chose for this installation. Note that this is the database name you supplied at the prompt when you ran the Installer. Use the mysql command line client to load the dump file like this:

  % mysql -u dlxsadm -p dlxs_vN < $DLXSROOT/misc/db/db-dump-vN.0-release.sql

That's it!

[edit] Database upgrading

NOTE: Please refer to DLXS Database Upgrade Utility for this step.


IMPORTANT NOTE
In the upgrade process, in your shell, $DLXSROOT must always be the root of the new DLXS release (or latest) installation. All previous upgrade_M_N+1 scripts are included with each DLXS release.

[edit] Upgrading across multiple database versions

If your existing database version is more than one version behind, run the $DLXSROOT/bin/db/upgrade_* scripts sequentially on the new database containing the dump of the earlier database version.

For example, if you copied dlxs_v3 into dlxs_v6 you would run, in order: $DLXSROOT/bin/db/upgrade_3_4, $DLXSROOT/bin/db/upgrade_4_5 and finally $DLXSROOT/bin/db/upgrade_5_6 all from the release 13 (or latest) install tree.

IMPORTANT NOTE when running upgrade_4_5
A file is missing from the release 13 CD and the .ISO file. In your release 13 install tree create this directory:
% mkdir -p $DLXSROOT/misc/db/ImageClassSampleData/version5

Download the following file from the DLXS web site and copy it into that directory: http://www.dlxs.org/products/archive-by-CDROM/13/Lib/src/misc/db/ImageClassSampleData/version5/icsample.sql

[edit] Database Versions

For reference here are the DLXS release numbers and their corresponding database version numbers:

DLXS releasedatabase version
81
92
103
11, 11a4
12, 12a5
136
147
158

Top

Personal tools