This chapter describes the steps necessary to use a MySQL 5.0 database with WebLogic Portal, and includes the following sections:
Review this entire chapter and any release notes before proceeding. The tasks described in this chapter should be performed by a database administrator.
Before proceeding, read Overview of Enterprise-Quality Database Configuration for WebLogic Portal.
WARNING: | The MySQL JDBC driver is not fully XA compatible, therefore WebLogic Portal does not support using the com.mysql.jdbc.jdbc2.optional.MysqlXADataSource . Data sources that require XA and those that are XA capable should use the com.mysql.jdbc.Driver with the global-transactions-protocol LoggingLastResource instead. |
The database creation scripts install domain-specific tables. You should work with a database administrator to modify the sample scripts, and to create the database users and tablespaces needed for your environment.
Multiple database users are required if you have multiple domains, or to run multiple environments using the same MySQL instance (for example, if you want to run development and system test from a single MySQL installation). GroupSpace requires a separate database user, as do any additional content management repositories.
To configure a MySQL database:
<
WLPORTAL_HOME
>/portal/db/mysql/admin
directory. See
Table 6-1, Database Scripts and Usage Notes, on page 6-8 and the comments in the scripts for additional information.
Perform the following steps to configure the main WebLogic Portal database:
create_database.sql
script and modify it appropriately for your environment. See
Table 6-1, Database Scripts and Usage Notes, on page 6-8 and the comments in the script for additional information. For more information on character sets, see Choosing Character Sets and Sort Orders.create_database.sql
script as a user with user account creation privileges (normally the root user). For example, from mysql
: mysql -uroot --password=password <create_database.sql
Follow the remaining steps only if you want to create database objects manually rather than using the Configuration Wizard. To perform the remaining steps using the Configuration Wizard, see Creating WebLogic Configurations Using the Configuration Wizard.
database.properties
file for edit.database=mysql
. mysql.user=@DB_USER@
mysql.password=@DB_PASSWORD@
mysql.url=jdbc:bea:mysql://@DB_HOST@:@DB_PORT@;SID=@DB_NAME@
<BEA_HOME>
\user_projects\domains\
myPortalDomain directory.create_db.cmd
.create_db.sh
.
If any error messages are displayed, check the create_db.log
file for additional information.
Note: | After running create_db script, you need to update the database administrator password. See Note About Creating or Refreshing Database Objects for detailed information. |
appsGroupSpaceDataSource
), which point to PointBase by default, with data sources that point to MySQL. You can configure them using the WebLogic Server Administration Console or choose from the samples provided and update them for your database environment. Sample jdbc.xml
definition files for MySQL are available in the <WLPORTAL_HOME>\portal\db\jdbc\mysql
directory. Follow the instructions in the <WLPORTAL_HOME>\portal\db\jdbc\README.txt
file.Note: | Do this while WebLogic Server is stopped. |
Perform the following steps to configure the GroupSpace database:
To configure the GroupSpace database, follow these steps:
create_database.sql
script and modify it appropriately for your environment. See
Table 6-1, Database Scripts and Usage Notes, on page 6-8 and the comments in the script for additional information. create_database.sql
script as a user with user account creation privileges (normally the root user). For example, from mysql
: mysql -uroot --password=password <create_database.sql
Follow the remaining steps only if you want to create database objects manually rather than using the Configuration Wizard. To perform the remaining steps using the Configuration Wizard, see Creating WebLogic Configurations Using the Configuration Wizard.
groupspace_database.properties
file for edit.database=mysql
. mysql.user=@DB_USER@
mysql.password=@DB_PASSWORD@
mysql.url=jdbc:bea:mysql://@DB_HOST@:@DB_PORT@;SID=@DB_NAME@
<BEA_HOME>
\user_projects\domains\
myPortalDomain directory.create_db.cmd -database.properties=groupspace_database.properties
create_db.sh -database.properties=groupspace_database.properties
If any error messages are displayed, check the create_db_groupspace.log file for additional information.
Note: | After running create_db script, you need to update the database administrator password. See Note About Creating or Refreshing Database Objects for detailed information. |
appsGroupSpaceDataSource
JDBC data source (which points to PointBase by default) with a data source that points to MySQL. Use the WebLogic Server Administration Console or update the sample jdbc.xml
definition file provided for MySQL in the <
WLPORTAL_HOME
>\portal\db\jdbc\
directory. Follow the instructions in the <
WLPORTAL_HOME
>\portal\db\jdbc\README.txt
file.
For improved performance, you might want to store behavior tracking events in a different location from other WebLogic Portal database objects. For more information about behavior tracking, see Setting Up Events and Behavior Tracking in the Interaction Management Guide.
Note: | By default, behavior tracking database objects are created in the same database as other WebLogic Portal database objects. You need to perform these steps only if you are configuring a separate database for behavior tracking events. |
To create a separate database for behavior tracking:
bt_create_database.sql
file for your environment, as indicated in the instructions contained in the scripts and in
Table 6-1, Database Scripts and Usage Notes, on page 6-8.bt_create_database.sql
as a user with system administrator privileges. For example, from osql
: mysql -uroot --password=password <bt_create_database.sql
<
WLPORTAL_HOME
>\portal\db\mysql
WEBLOGIC_EVENT
and run the following scripts:<
WLPORTAL_HOME
>\portal\db\data\required
:p13n.trackingDataSource
with that data source and then remove p13n.trackingDataSource
from p13nDataSource
.
Table 6-1 describes the scripts that enable you to configure the MySQL database and create WebLogic Portal objects in that database.
Creates a database. You must create a main WebLogic Portal database. If you want to use GroupSpace, you must also create that database. You must also create a database for any additional content management repositories.
Make a copy of this script and edit it to replace
<<WEBLOGIC>> with the appropriate database name, database owner user, and password for each database you create.
When you run the script with these values, it creates the
WEBLOGIC database and the WEBLOGIC database owner user, and grants privileges to the WEBLOGIC user in order to create database objects.
|
|||||