Page 1 of 1

New instalation and MySQL problem

PostPosted:Mon Jan 25, 2016 2:18 pm
by skorpion78
Hello,

My system is: Debian 8.2. x64
java version "1.7.0_80"
Java (TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot (TM) 64-Bit Server VM (build 24.80-b11, mixed mode).
MySQL 5.5.46-0 + deb8u1.

When openkm 6.3.1 installs a community of tutorial http://wiki.openkm.com/index.php/MySQL_-_OpenKM_6.2.

They indicate a lack of permissions to the database. If the user "openkm" logs on to phpMyAdmin that I can assume tables and perform surgery on them.

Code: Select all
47: user lacks privilege or object not found: OKM_TRANSLATION [ INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('frontend', 'user.preferences.roles', 'Rôles', 'fr-FR') ]
2016-01-25 15:03:36,879 [localhost-startStop-1] ERROR com.openkm.dao.HibernateUtil- Error during script execution at line 1148: user lacks privilege or object not found: OKM_TRANSLATION [ INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('frontend', 'user.preferences.user', 'Utilisateur', 'fr-FR') ]
2016-01-25 15:03:36,879 [localhost-startStop-1] ERROR com.openkm.dao.HibernateUtil- Error during script execution at line 1149: user lacks privilege or object not found: OKM_TRANSLATION [ INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('frontend', 'user.preferences.user.data', 'Compte utilisateur', 'fr-FR') ]
2016-01-25 15:03:36,879 [localhost-startStop-1] ERROR com.openkm.dao.HibernateUtil- Error during script execution at line 1150: user lacks privilege or object not found: OKM_TRANSLATION [ INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('frontend', 'validation.alphanumeric.required', 'Champ alpha-numérique requis', 'fr-FR') ]
2016-01-25 15:03:36,879 [localhost-startStop-1] ERROR com.openkm.dao.HibernateUtil- Error during script execution at line 1151: user lacks privilege or object not found: OKM_TRANSLATION [ INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('frontend', 'validation.decimal.required', 'Champ décimal requis', 'fr-FR') ]
2016-01-25 15:03:36,879 [localhost-startStop-1] ERROR com.openkm.dao.HibernateUtil- Error during script execution at line 1152: user lacks privilege or object not found: OKM_TRANSLATION [ INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('frontend', 'validation.gt.required', 'Doit être plus grand que', 'fr-FR') ]
2016-01-25 15:03:36,879 [localhost-startStop-1] ERROR com.openkm.dao.HibernateUtil- Error during script execution at line 1153: user lacks privilege or object not found: OKM_TRANSLATION [ INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('frontend', 'validation.lt.required', 'Doit être plus petit que', 'fr-FR') ]
2016-01-25 15:03:36,879 [localhost-startStop-1] ERROR com.openkm.dao.HibernateUtil- Error during script execution at line 1154: user lacks privilege or object not found: OKM_TRANSLATION [ INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('frontend', 'validation.mail.required.field', 'Champ Email requis', 'fr-FR') ]
2016-01-25 15:03:36,879 [localhost-startStop-1] ERROR com.openkm.dao.HibernateUtil- Error during script execution at line 1155: user lacks privilege or object not found: OKM_TRANSLATION [ INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('frontend', 'validation.max.required', 'Valeur du maximum requis', 'fr-FR') ]

Re: New instalation and MySQL problem

PostPosted:Tue Jan 26, 2016 10:13 am
by skorpion78
hello,

6.3.1 Test installation openkm done three times. Unfortunately, the system hangs during the performance of OCR. It does not work with MySQL, once I was able to connect to the database and create the tables, but I do not know what I did that worked.
Version 6.3.1 when configured with tesseract3 freezes. When I add a document to the repository and enable the TextExtraction openkm not responding. Testo OCR to use file attachment.


Version 6.3.0 installed and configured the connection to MySQL by tutorial works flawlessly with MySQL database server. I did upgrade to version 6.3.2.2, and so far it works ok.

Regards
Sebek

Re: New instalation and MySQL problem

PostPosted:Tue Jan 26, 2016 10:20 am
by Catscratch
"user lacks privilege or object not found" is a pretty clear error message. Try to set the following in OpenKM.cfg:
Code: Select all
hibernate.hbm2ddl=create
And also check the user rights on the table. He should have anything from create to insert.

Re: New instalation and MySQL problem

PostPosted:Tue Jan 26, 2016 10:36 am
by skorpion78
Hello Catscratch,

Thank you for your answer. Permissions are assigned correctly. The user "openkm" has all the rights to the database. I log in to the MySQL server user account "openkm" and perform all tasks associated with setting up tables and records. I used to test settings for the MySQL root user who has all the powers, still the same. Acted according to the tutorial, all activities which are already wrote therein.


Regards
Sebek

Re: New instalation and MySQL problem

PostPosted:Tue Jan 26, 2016 11:01 am
by Catscratch
Did you tried create mode?

Re: New instalation and MySQL problem

PostPosted:Tue Jan 26, 2016 7:55 pm
by skorpion78
hello,

Yes, it is described in the first line tutorial.

Regards
Sebek

Re: New instalation and MySQL problem

PostPosted:Thu Jan 28, 2016 12:44 pm
by jllort
Is the mysql server and openkm in same server or not ?
Can you connect from openkm server to mysql ( test it, because login with phpMySQLAdmin is not the same than login with server client you should create a valid openkm user to connect from any ip ( 'openkm'@'%' -> this is openkm user valid for any ip connection, openkm@localhost only can connect to mysql server from localhost )

Finally has not relation OCR engine configuration with MySQL database.

Which is your problem ? the error showing in log or OpenKM is not starting up with your MySQL configuration ?

Re: New instalation and MySQL problem

PostPosted:Thu Jan 28, 2016 2:11 pm
by skorpion78
Hello,

I installed on a single server:
Debian 8.2. x64
java version "1.7.0_80"
Java (TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot (TM) 64-Bit Server VM (build 24.80-b11, mixed mode).
MySQL 5.5.46-0 deb8u1.

As a last install and run openkm Community 6.3.1

The steps performed:
1. Starting openkm database HSQL

openkm.cfg
Code: Select all
hibernate.dialect = org.hibernate.dialect.HSQLDialect
hibernate.hbm2ddl = create
The system starts correctly, you can log in to the administrator.

2. Stop openkm server and changing openkm.cfg
Code: Select all
hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.hbm2ddl = create
3. Setting the parameters in the server.xml to connect to the database.
Code: Select all
<Resource name = "jdbc / OpenKMDS" auth = "Container" type = "javax.sql.DataSource"
          maxActive = "100" maxIdle = "30" maxWait = "10000" validationQuery = "select 1"
          username = "openkm" password = "* secret *" driverClassName = "com.mysql.jdbc.Driver"
          url="jdbc:mysql://localhost:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8"/>
4. Set the file my.cnf variable:
Code: Select all
default-storage-engine = innodb
restart mysql

5. logs on to the MySQL server using the console and as root:
Code: Select all
mysql -h localhost -u root -p
I create the database:
Code: Select all
DROP DATABASE IF EXISTS okmdb;
CREATE DATABASE okmdb DEFAULT DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
and the user:
Code: Select all
CREATE USER openkm @ localhost IDENTIFIED BY '* secret *';
GRANT ALL ON okmdb. * TO openkm @ localhost WITH GRANT OPTION;
6. Starts openkm and log show error. Log included in first post.

7. Install 6.3.0 openkm community and not change anything in the mysql database, configures openkm.cfg and server.xml files and starts openkm.
Everything is done flawlessly, tables are set up and after about 60 seconds you can log in to the system.

8. I made an update to ver 6.3.2 dev, I configured ocr, LibreOffice plugin ghost script. Everything works as it should and not be suspended.

Sorry for my english (google translator). I hope that everything I have described.
Regards
Sebek

Re: New instalation and MySQL problem

PostPosted:Sat Jan 30, 2016 8:52 am
by jllort
For what you are telling us seems the problem is on creation with version 6.3.1 binding mysql database, no ? Is quite strange because the process for creating database on HSQL is exactly the same in MySQL or other databaes, if it fails should fails for all.

Did you followed the upgrading steps from 6.3.0 to 6.3.1 ?
http://wiki.openkm.com/index.php/Migrat ... 3_to_6.3.1

Re: New instalation and MySQL problem

PostPosted:Sat Jan 30, 2016 12:30 pm
by skorpion78
hello,

Yes, im followall steps in upgrading tutorial.

Regards
Sebek