![]() |
|||||||||||||||||||||||||||||||||||
|
Version
Table of Contents 1.2 What do you need to understand this book 3 3 Upgrading from previous versions 5 3.1 The SQL Script upgrade-from-... 5 3.2 The SQL Script migrate-from-... 5 3.3 The SQL Script drop-from-... 6 3.4 The SQL Script dbcreate-views.sql 6 3.5 The SQL Script dbcreate-indexes.sql 6
List of Figures Figure 1: Create a new database 7 Figure 2: Create schema crx-crx 7 Figure 3: Add new user 8 Figure 4: Grant privileges to user system 9 Figure 5: Execute script dbcreate-tables.sql 10
List of Listings Listing 1: Setting in my.ini so that MySQL defaults to InnoDB 4 Listing 2: Setting lower_case_table_names in my.ini 11
1 About this BookThis book describes how to setup an openCRX database instance for MySQL. 1.1 Who this book is forThe intended audience are openCRX database administrators. 1.2 What do you need to understand this bookThis book describes the installation of openCRX for MySQL. The book assumes that you are familiar with MySQL installation and configuration. 1.3 Tips, Warnings, etc.We make use the following pictograms:
2 PrerequisitesAs a first step you must download the following software packages:
As a next step you must install MySQL Database Server and MySQL GUI Tools (Administrator, Query Browser) - please refer to the MySQL documentation for installation details.
This document assumes that you use the MySQL Administrator for database administration. The JDBC driver is required for the application server installation. 3 Upgrading from previous versionsIf you already have MySQL for openCRX installed, upgrade the database as explained below. You can then skip the rest of this document.
3.1 The SQL Script upgrade-from-...In a first step you must upgrade your database. openCRX distributions provide an SQL script of the form upgrade-from-<version from>-to-<version to>.sql If you have installed openCRX 2.4.0, for example, and you want to upgrade to version 2.5.0 you have to run the script upgrade-from-2.4.0-to-2.5.0.sql on your database instance. 3.2 The SQL Script migrate-from-...In a second step you must migrate your database. openCRX distributions often times provide an SQL script of the form migrate-from-<version from>-to-<version to>.sql If you have installed openCRX 2.4.0, for example, and you want to upgrade to version 2.5.0 you have to run the script upgrade-from-2.4.0-to-2.5.0.sql on your database instance. 3.3 The SQL Script drop-from-...Next you can drop unused tables from your database. openCRX distributions often times provide an SQL script of the form drop-from-<version from>-to-<version to>.sql If you have installed openCRX 2.4.0, for example, and you want to drop tables not used by openCRX 2.5.0 you can run the script drop-from-2.4.0-to-2.5.0.sql on your database instance. Alternatively, you can also rename such tables, e.g. from transition_type to _unused_transition_type. Also, it goes without saying that you should never drop a table before you made a backup! 3.4 The SQL Script dbcreate-views.sqlMost new openCRX versions make use of new/changed views, i.e. if an openCRX distribution includes an SQL script of the form dbcreate-views.sql then you should run that script. If you have installed openCRX 2.4.0, for example, and you want to upgrade to openCRX 2.5.0 you should run the script dbcreate-views.sql on your database instance. Make sure that old views are indeed dropped and new views properly created (the script first deletes old views and then creates new views – if you deleted the views manually it is sufficient to execute the create view statements...). 3.5 The SQL Script dbcreate-indexes.sqlMost new openCRX versions make use of new/changed indexes, i.e. if an openCRX distribution includes an SQL script of the form dbcreate-indexes.sql then you should run that script. If you have installed openCRX 2.4.0, for example, and you want to upgrade to openCRX 2.5.0 you should run the script dbcreate-indexes.sql on your database instance. 3.6 Populate PreferencesThe last step involves deleting old preferences and populating the table with new ones. Run the SQL script populate-preferences.sql to do this.
4 Create the databaseAs a first step you create the database with MySQL Administrator. Start MySQL Administrator and connect to your DB Server. Select Catalogs and then Create New Schema from the pop-up menu as shown below: Figure 1: Create a new database Enter crx-crx as database name (please note that MySQL on Windows ignores capitalization, whereas MySQL on Linux is case-sensitive) and click OK: Figure 2: Create schema crx-crx
Next you must create a database user and grant this user access to the newly created database. Select User Administration and then Add new User from the pop-up menu as shown below: Figure 3: Add new user Complete the Login Information and Additional information. We assume that you create the user system and set the password to manager .
Next you must grant the user system access to the database crx-crx. Select the tab Schema Privileges and then select the schema crx-crx. Move all privileges from the pane Available Privileges to the pane Assigned Privileges and click the button Apply changes as shown below: Figure 4: Grant privileges to user system You have completed creating the database crx-crx. 5 Install the openCRX Database Schema ObjectsAfter creating the schema you are now ready to install the openCRX database schema objects. The following scripts must be executed:
Start the MySQL Query Browser and connect to your DB server. Select the schema crx-crx, then create a new script tab with File > New Script Tab. Copy/paste the database script dbcreate-tables.sql and execute by clicking on the button Execute: Figure 5: Execute script dbcreate-tables.sql
Similarly, execute the remaining scripts in the following order:
The scripts should run without errors and after execution you might want to verify with MySQL Administrator that all the tables, indices, and views were properly created (panes [Schema Tables] , [Schema Indices], and [Views]). 6 Next StepsIf you have completed successfully the database installation you are ready to use the openCRX database crx-crx. The application server installation guides explain how to connect the application server to the openCRX database instance. License
The contents of this file are
subject to a BSD license (the "License"); you may not use
this file except in compliance with the License. You may obtain a
copy of the License at http://
Copyright 2009 ©
CRIXP Corp. All rights reserved. |
||||||||||||||||||||||||||||||||||
![]() | ![]() |