To configure the sample database by setting up the database schema and populating the database with sample data:
Bring up the MySQL command line.
On Windows - Click Window’s Start Menu > MySQL > MySQL Server 5.1 > MySQL Command Line Client
On Linux, etc. - Type
Execute the following SQL script:
mysql> source “
"[DRM SDK DVD]\Reference Implementation\Server\Reference Implementation Server\dbscript\createsampledb.sql" dbscript\createsampledb.sql”
This script adds the user account
dbuser, establishes a connection through a web application, and creates a database schema.
Ensure that there is no semicolon (
;) at the end of the script.
PopulateSampleDB.sql script that populates sample data in the tables to include data for your testing.
This script is located in the
[DRM SDK DVD]\Reference Implementation\Server\Reference Implementation Server\dbscript\ dbscript\ folder.
Execute the PopulateSampleDB script to populate the data as you did in step 2.
The first time that you run the CreateSampleDB.sql script the following error occurs:
You can safely ignore this error. It only occurs the first time you run this script.
You need to configure the Database Connection Pooling (DBCP), which uses the Jakarta-Commons Database Connection Pool. A JNDI Datasource TestDB is configured to take advantage of this application server connection pooling. To change the database connection to point to a MySQL server that is not on localhost, modify one of the following files:
The META-INF\context.xml file, which specifies the location, username, and password of the license server’s database that is in the flashaccess.war file.
[DRM SDK DVD]\Reference Implementation\Server\Reference Implementation Server\refimpl\WebContent/META-INF\context.xml file.
and recreate the WAR file by using the updated files.
To change any of these parameters, edit the context.xml file in the WebContent directory and use the Ant script to recreate the WAR file. To tune the database, change the JNDI datasource settings in this file.
If you debug the Reference Implementation project in Eclipse, add
$CATALINA_HOME\lib\tomcat-dbcp.jar to your run/debug configuration.
If you run the flashaccess.war file on a standalone Tomcat 6.0 server, this step is not required.