• Usage of MySQL DB not working - no connection

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
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.
 #24537  by Fistandantilus
 
Hi,

I have a Synology NAS here where also some MySQL databases are running.
I would also like to store the openKM db there.

Therefore I have done the following:

1. added the these lines to openkm.cfg
Code: Select all
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
hibernate.hbm2ddl=create
2. created db and user
Code: Select all
CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER openkm@localhost IDENTIFIED BY 'admin';
GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;
3. changed the server.xml
Code: Select all
    <Resource name="jdbc/OpenKMDS" auth="Container" type="javax.sql.DataSource"
            maxActive="100" maxIdle="30" maxWait="10000" validationQuery="select 1 from INFORMATION_SCHEMA.SYSTEM_USERS"
            username="openkm" password="admin" driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://192.168.1.100:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8"/>
When I now try to open the portal I get this error:
Class: org.apache.jasper.JasperException
Message: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection
Date: Fri Aug 09 00:12:02 CEST 2013
Error Log shows:
0:0:0:0:0:0:0:1%0 - - [09/Aug/2013:00:12:02 +0200] "GET /OpenKM HTTP/1.1" 302 -
0:0:0:0:0:0:0:1%0 - - [09/Aug/2013:00:12:02 +0200] "GET /OpenKM/ HTTP/1.1" 302 -
0:0:0:0:0:0:0:1%0 - - [09/Aug/2013:00:12:02 +0200] "GET /OpenKM/frontend/index.jsp HTTP/1.1" 302 -
0:0:0:0:0:0:0:1%0 - - [09/Aug/2013:00:12:02 +0200] "GET /OpenKM/login.jsp HTTP/1.1" 500 1201
0:0:0:0:0:0:0:1%0 - - [09/Aug/2013:00:12:03 +0200] "GET /OpenKM/css/desktop.css HTTP/1.1" 304 -
Connecting to the db using the credentials through another application (Sequel Pro) is working.
Using OS X.

Btw running the package as downloaded is working fine. But I need to access the db from 3 different machines.

best regards,
F.
 #24538  by Fistandantilus
 
OK, got one step further.
After changing server.xml to
<Resource name="jdbc/OpenKMDS" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000" validationQuery="select 1"
username="openkm" password="admin" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://192.168.1.100:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8"/>
I now get this error:
Class: org.apache.jasper.JasperException
Message: javax.servlet.ServletException: com.openkm.core.DatabaseException: could not execute query
Date: Fri Aug 09 00:47:23 CEST 2013
Looks like at least connection was successful now?

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.