Documentation

MySQL Integration

Create MySQL Database

Create the database via MySQL command line, log in as admin user and run the following commands:

CREATE DATABASE bemoko;
GRANT ALL ON bemoko.* TO 'bemoko'@'localhost' IDENTIFIED BY 'password';

There is no need to create the tables, bemoko will create the these when it is first run.

Tomcat 7 Configuration

  1. Download the MySQL jdbc driver - and copy the jar file into the TOMCAT_HOME/lib directory
  2. Configure the datasource connection to the bemoko schema in the TOMCAT_HOME/conf/context.xml by placing the following between the context tags:

 

<Resource 
  name="jdbc/BemokoLiveDB" 
  auth="Container" 
  type="javax.sql.DataSource" 
  removeAbandoned="true" removeAbandonedTimeout="30" maxActive="100" maxIdle="30" maxWait="10000"
  username="bemoko" password="password" testOnBorrow="true" validationQuery="select 1"
  driverClassName="com.mysql.jdbc.Driver" 
  url="jdbc:mysql://localhost/bemoko?useUnicode=true&amp;characterEncoding=UTF-8"/>

Tomcat Startup

Ensure that -Dbemoko.datasource.mode=jndi is included on the Tomcat JVM initialisation, e.g. in setenv.bat or setenv.sh file found in TOMCAT_HOME\bin\, or set JNDI mode in your live-config.xml file if you are using one.

<live>
  ....
  <datasource>
    <mode>jndi</mode>
  </datasource>    
</live>

Running the Tomcat Server

It is strongly advised to run the Tomcat server in Cygwin rather than the default Windows command window for the enhanced functionality Cygwin delivers. To do this type catalina.bat run into Cygwin

Collation & Language Settings

Collation governs the rules that determine how data is sorted and compared. We recommend to use case sensitive collation for a bemoko database. If you're running in a US / English system locale then we recommend you stick with the default Dictionary order, case-insensitive, for use with 1252 character set along with Latin1_General character set.


More