Changeset 2489


Ignore:
Timestamp:
Aug 7, 2006, 3:49:11 PM (16 years ago)
Author:
Jari Häkkinen
Message:

Added PostgreSQL setup information.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/installation.html

    r2447 r2489  
    7474
    7575  <li>
    76   <p>
    77     <i>MySQL</i> <br>
     76  <p>
     77    <i>SQL database</i> <br>
     78    Hibernate does support a plethora of database engines, but so far
     79    we only work with MySQL and PostgreSQL:
     80  </p>
     81  <p>
     82    a) MySQL<br>
    7883    Download and install MySQL (tested with version 5.0), available from
    7984    <a href=http://www.mysql.com/>http://www.mysql.com/</a>. You need to
     
    8186    color=#00cc00>skip-networking</font> option must
    8287    <strong>not</strong> be used. The InnoDB table engine is also
    83     needed, so don't disable them (not that you would). Hibernate does
    84     support a plethora of database engines, but so far we only work with
    85     MySQL and PostgreSQL.
    86   </p>
    87   <p>
    88     <i>PostgreSQL</i><br>
     88    needed, so don't disable them (not that you would). BASE comes
     89    pre-configured for MySQL so there is no need to change database
     90    settings in the BASE config files.
     91  </p>
     92  <p>
     93    b) PostgreSQL<br>
    8994    PostgreSQL 8.0 seems to be working very well. Actaully sometimes even better
    9095    than with MySQL. If you want to use Postgres instead of MySQL you will have to edit
     
    131136  <li>
    132137  <p>
    133     <i>BASE</i> (SQL database)<br>
     138    <i>BASE</i> (SQL database)<br>
     139    Instructions for MySQL and PostgreSQL are available below. The
     140    database names, the <tt>user</tt>, and the <tt>password</tt> can be
     141    changed during the creation of the databases. It is recommended to
     142    change the <tt>password</tt>, the other changes can be made if
     143    required.
     144  </p>
     145  <p>
     146    The database names, the <tt>user</tt>, and the <tt>password</tt>
     147    are needed in a later step below when configuring BASE.
     148  </p>
     149  <p>
     150    a) MySQL<br>
    134151    Create a new database for BASE, and add a
    135152    <tt>user</tt> with at least <tt>SELECT</tt>, <tt>INSERT</tt>,
    136153    <tt>UPDATE</tt>, <tt>DELETE</tt>, <tt>CREATE</tt>, <tt>DROP</tt>,
    137154    <tt>INDEX</tt> and <tt>ALTER</tt> permission for the new
    138     database. Connect to your mysql server and do:
     155    database. To do this, connect to your mysql server and issue the
     156    next lines:
    139157<pre class="code">
    140158  CREATE DATABASE base2;
     
    148166    The <code>base-2.0RC2/misc/sql/createdb.mysql.sql</code> file
    149167    contains the above statments and can be used by the <code>mysql</code>
    150     command-line tool:
    151   </p>
     168    command-line tool (remember to edit the <tt>user</tt>,
     169    <tt>password</tt>, and the database names in the script file before
     170    executing the commmand):
    152171<pre class="code">
    153172mysql -uroot -p &lt; ./misc/sql/createdb.mysql.sql
    154173</pre>
    155  
    156   <p>
    157     The database names and the <tt>user</tt> and <tt>password</tt> is
    158     needed when configuring BASE below.
     174    The header in the script file contains further information about
     175    the script.
     176  </p>
     177 
     178  <p>
     179    b) PostgreSQL<br>
     180    Create a new database for BASE, and add a
     181    <tt>user</tt> with the proper privileges. To do this, login as
     182    your PostgreSQL user and issue the next lines:
     183<pre class="code">
     184  createuser base2user -P
     185    # this will prompt for an password for the new user, and issue two
     186    # more question that should be answered with character 'n' for no.
     187  createdb --owner base2user --encoding UNICODE base2
     188  psql base2
     189    # this will start the psql command line tool. Issue the next line
     190    # within the tool and quit with a '\q'.
     191  CREATE SCHEMA "dynamic" AUTHORIZATION "base2user";
     192</pre>
     193  </p>
     194  <p>
     195    The <code>base-2.0RC2/misc/sql/createdb.postgresql.sql</code> file
     196    contains the above statments and can be used by the <code>psql</code>
     197    command-line tool:
     198<pre class="code">
     199psql -f ./misc/sql/createdb.posgres.sql template1
     200</pre>
     201    The header in the script file contains further information about
     202    the script.
    159203  </p>
    160204  </li>
Note: See TracChangeset for help on using the changeset viewer.