• Mysql to build the table the issue

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #3439  by hayasi
 
Hello everyone!
I want to use mysql as a database. And has built a "openkm" database.But I do not know what the statement is to build the table.openkm whether it will build the table itself when the server starts.The following is the configuration of openkm-ds.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<datasources>
  <!-- OpenKM User Activity -->
  <local-tx-datasource>
    <jndi-name>OKMActivityDS</jndi-name>
    <connection-url>jdbc:mysql://192.168.1.4:3306/openkm</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    <password></password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>20</max-pool-size>
    <idle-timeout-minutes>0</idle-timeout-minutes>
    <track-statements/>
    <!--<security-domain>HsqlDbRealm</security-domain>-->
    <prepared-statement-cache-size>32</prepared-statement-cache-size>
    <metadata>
      <type-mapping>mySQL</type-mapping>
    </metadata>
   <!--  <depends>jboss:service=Hypersonic,database=OKMActivity</depends>  -->
  </local-tx-datasource>

  <!-- For hsqldb accessed from jboss only, in-process (standalone) mode --> 
  <mbean code="com.mysql.jdbc.Driver" 
         name="jbosservice=mySQL,database=openkm">
    <attribute name="Database">openkm</attribute>
    <attribute name="InProcessMode">true</attribute>
  </mbean>
 
  <!-- OpenKM User Auth -->
  <local-tx-datasource>
    <jndi-name>OKMAuthDS</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/openkm</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    <password></password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>20</max-pool-size>
    <idle-timeout-minutes>0</idle-timeout-minutes>
    <track-statements/>
    <!--<security-domain>HsqlDbRealm</security-domain>-->
    <prepared-statement-cache-size>32</prepared-statement-cache-size>
    <metadata>
      <type-mapping>mySQL</type-mapping>
    </metadata>
   <!--  <depends>jboss:service=Hypersonic,database=OKMAuth</depends>  -->
  </local-tx-datasource>

  <!-- For hsqldb accessed from jboss only, in-process (standalone) mode --> 
  <mbean code="com.mysql.jdbc.Driver" 
         name="jboss:service=mySQL,database=openkm">
    <attribute name="Database">openkm</attribute>
    <attribute name="InProcessMode">true</attribute>
  </mbean>
   
  <!-- OpenKM Dashboard Stats -->
  <local-tx-datasource>
    <jndi-name>OKMDashboardStatsDS</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/openkm</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    <password></password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>20</max-pool-size>
    <idle-timeout-minutes>0</idle-timeout-minutes>
    <track-statements/>
    <!--<security-domain>HsqlDbRealm</security-domain>-->
    <prepared-statement-cache-size>32</prepared-statement-cache-size>
    <metadata>
      <type-mapping>mySQL</type-mapping>
    </metadata>
  <!--  <depends>jboss:service=Hypersonic,database=OKMDashboardStats</depends>  --> 
  </local-tx-datasource>

  <!-- For hsqldb accessed from jboss only, in-process (standalone) mode --> 
  <mbean code="com.mysql.jdbc.Driver" 
         name="jboss:service=mySQL,database=openkm">
    <attribute name="Database">openkm</attribute>
    <attribute name="InProcessMode">true</attribute>
  </mbean>
</datasources>
Thanks in advance
 #3441  by pavila
 
You can find the tables definitions inside the OpenKM.ear -> OpenKM.ear/OpenKM.war/WEB-INF/classes/es/git/openkm/dao/*.ddl . These table definitions are build for HSQL but can work in MySQL with little modifications.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.