Database Installation

From DLXS Documentation

(Difference between revisions)
Jump to: navigation, search
(Database upgrading)
Current revision (15:10, 9 August 2007) (edit) (undo)
 
Line 1: Line 1:
-
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.
 
-
 
-
# Start the SQL monitor with the command <tt>mysql -u root -p mysql</tt> (you will be prompted for the MySQL system password).
 
-
# Create the DLXS database with the command <tt>create database dlxs;</tt>. 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 <tt>dlxs</tt>.  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.
 
-
# Create the <tt>dlxsadm</tt> (administrative) account and grant full privileges to it with the command <tt>grant all privileges on dlxs.* to dlxsadm identified by '<i>password</i>';</tt>, where <i>password</i> is the password to be used for DLXS database administration.
 
-
# Grant FILE privilege to the <tt>dlxsadm</tt> account with the command <tt>grant file on *.* to dlxsadm;</tt>.
 
-
# Create the <tt>dlxs</tt> account and grant basic privileges to it with the command <tt>grant select,insert,update,delete,references on dlxs.* to dlxs identified by '<i>password</i>';</tt>, where <i>password</i> is the password to be used for general DLXS database usage (such as from within the DLXS middleware).
 
-
# Activate the changes with the command <tt>flush privileges;</tt>.
 
-
# Exit the SQL monitor with the command <tt>quit</tt>.
 
-
 
-
 
-
<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>
 
-
 
-
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:
 
-
 
-
  % mysql -u dlxsadm -p dlxs_v6 &lt; $DLXSROOT/misc/db/db-dump-v6.0-release.sql
 
-
 
-
That's it!
 
-
 
-
   
 
-
==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>
 
-
    <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]]
 
-
        <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>:
 
-
          <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>
 
-
  </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>
 
-
    <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>
 
-
      For reference:
 
-
      <table border="1" width="30%">
 
-
        <tr><td><b>DLXS release</b></td><td><b>database version</b></td></tr>
 
-
        <tr><td>8</td><td>1</td></tr>
 
-
        <tr><td>9</td><td>2</td></tr>
 
-
 
-
        <tr><td>10</td><td>3</td></tr>
 
-
        <tr><td>11, 11a</td><td>4</td></tr>
 
-
        <tr><td>12, 12a</td><td>5</td></tr>
 
-
        <tr><td>13</td><td>6</td></tr>
 
-
      </table>
 
-
 
-
    </p>
 

Current revision

Personal tools