# --
# README.database - database description of OTRS
# Copyright (C) 2001-2002 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: README.database,v 1.12 2003/02/09 13:17:42 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see 
# the enclosed file COPYING for license information (GPL). If you 
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --

Where can I find the database description files?
================================================

XML:
====
$HOME_OTRS/scripts/database/otrs-schema.xml

The XML description files for torque which generate the SQL for your 
target database e. g. MySQL, PostgreSQL, DB2, Oracle, ...)

More Infos: http://jakarta.apache.org/turbine/turbine-2/howto/torque-howto.html 

MySQL: 
------
$HOME_OTRS/scripts/database/otrs-schema.mysql.sql

PostgreSQL:
-----------
$HOME_OTRS/scripts/database/otrs-schema.postgresql.sql

Initial insert file:
====================
$HOME_OTRS/scripts/database/initial_insert.sql contains all needed standard 
values. At first use the otrs-schema.*.sql and the insert this file.



DB - Setup Example (MySQL):
===========================
Create OTRS database:
---------------------
shell> mysql -u root -p -e 'create database otrs'

Create the OTRS tables:
-----------------------
shell> mysql -u root -p otrs < scripts/database/otrs-schema.mysql.sql

Insert inital data:
-------------------
shell> mysql -u root -p otrs < scripts/database/initial_insert.sql

Create an database user:
-----------------------
shell> mysql -u root -p -e 'GRANT ALL PRIVILEGES ON otrs.* TO otrs@localhost IDENTIFIED BY "some-pass" WITH GRANT OPTION;'

Reload the grant tables of your mysql-daemon:
---------------------------------------------
shell> mysqladmin -u root -p reload

**************************************************************
*                                                            *
* Change the DB-Settings (host, database, user and password) *
*                                                            *
*   $OTRS_HOME/Kernel/Config.pm                              *
*   [...]                                                    *
*   # Database                                               *
*   # (The database name.)                                   *
*   $Self->{Database} = 'otrs';                              *
*                                                            *
*   # DatabaseUser                                           *
*   # (The database user.)                                   *
*   $Self->{DatabaseUser} = 'otrs';                          *
*                                                            *
*   # DatabasePw                                             *
*   # (The password of database user.)                       *
*   $Self->{DatabasePw} = 'some-pass';                       *
*   [...]                                                    *
*                                                            *
**************************************************************

EOF
