Installing and Upgrading the Database

From DLXS Documentation

(Difference between revisions)
Jump to: navigation, search
Line 28: Line 28:
==Database upgrading==
==Database upgrading==
-
<p>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. </p>
+
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.  
-
    <p>
+
-
      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:
+
-
      <ol>
+
-
        <li>dump  <tt>dlxs_v5</tt> using:<blockquote><tt> mysqldump -u dlxsadm -p dlxs_v5 > dlxs_v5_dump.sql</tt></blockquote>  </li>
+
-
<li>create an empty <tt>dlxs_v6</tt> database as described above in [[#MySQL configuration]]
+
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:
-
        <li>load <tt>dlxs_v5_dump.sql</tt> into <tt>dlxs_v6</tt>: <blockquote><tt>mysql -u dlxsadm -p dlxs_v6 < dlxs_v5_dump.sql</tt></blockquote></li>
+
-
        <li>upgrade the copy of <tt>dlxs_v5</tt> that you loaded into <tt>dlxs_v6</tt>:
+
;Step 1: dump <tt>dlxs_v5</tt> using
-
          <blockquote><tt>$DLXSROOT/bin/db/upgrade_5_6</tt></blockquote> 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. </li>
+
   
-
</ol>
+
% mysqldump -u dlxsadm -p dlxs_v5 > dlxs_v5_dump.sql
-
  </p>
+
-
    <p>If your existing database version is more than one version behind 6, run the <tt>$DLXSROOT/bin/db/upgrade_*</tt> sequentially on the copied database, starting with the version of the copied database.</p>
+
;Step 2: create an empty <tt>dlxs_v6</tt> database as described above in [[#MySQL configuration|MySQL configuration]]
-
    <p>For example if you copied <tt>dlxs_v3</tt> into <tt>dlxs_v6</tt> then 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>.  Again, <tt>$DLXSROOT</tt> would be the root of the new DLXS release 13 installation.</p>
+
 
 +
;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.
 +
 
 +
<p>If your existing database version is more than one version behind 6, run the <tt>$DLXSROOT/bin/db/upgrade_*</tt> sequentially on the copied database, starting with the version of the copied database.</p>
 +
<p>For example if you copied <tt>dlxs_v3</tt> into <tt>dlxs_v6</tt> then 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>.  Again, <tt>$DLXSROOT</tt> would be the root of the new DLXS release 13 installation.</p>
     <p>
     <p>

Revision as of 14:10, 14 August 2007

Main Page > Installing DLXS > Installing and Upgrading the Database


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

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-v6.0-release.sql.

Let dlxs_v6 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_v6 < $DLXSROOT/misc/db/db-dump-v6.0-release.sql

That's it!


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.

Let's say your current database is named dlxs_v5 and the new database will be named dlxs_v6. To make a copy of your current MySQL database and upgrade it:

Step 1
dump dlxs_v5 using
% mysqldump -u dlxsadm -p dlxs_v5 > dlxs_v5_dump.sql
Step 2
create an empty dlxs_v6 database as described above in MySQL configuration
Step 3
load dlxs_v5_dump.sql into dlxs_v6
% mysql -u dlxsadm -p dlxs_v6 < dlxs_v5_dump.sql
Step 4
upgrade the copy of dlxs_v5 that you loaded into dlxs_v6
% $DLXSROOT/bin/db/upgrade_5_6

where $DLXSROOT is the root of the new DLXS release 13 installation. This means upgrade_5_6 will act on the database name you supplied when you installed release 13.

If your existing database version is more than one version behind 6, run the $DLXSROOT/bin/db/upgrade_* sequentially on the copied database, starting with the version of the copied database.

For example if you copied dlxs_v3 into dlxs_v6 then run, in order: $DLXSROOT/bin/db/upgrade_3_4, $DLXSROOT/bin/db/upgrade_4_5 and finally $DLXSROOT/bin/db/upgrade_5_6. Again, $DLXSROOT would be the root of the new DLXS release 13 installation.

For reference:

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


Top

Personal tools