Page 2 of 2

Re: Cannot connect to MYSQL

PostPosted:Tue Jun 05, 2018 8:29 am
by lnovoa
Hi!,
try executed this on database:
Code: Select all
GRANT ALL ON okmdb.* TO UserDatabase@localhost WITH GRANT OPTION;
UserDatabase: you have to modify it.

Re: Cannot connect to MYSQL

PostPosted:Wed Jun 06, 2018 4:41 am
by cdc
Did that
Still no success.

Re: Cannot connect to MYSQL

PostPosted:Wed Jun 06, 2018 9:00 am
by lnovoa
What version of mysql do you have installed?

Re: Cannot connect to MYSQL

PostPosted:Wed Jun 06, 2018 9:45 am
by cdc
Server version: 8.0.11 MySQL Community Server - GPL

Re: Cannot connect to MYSQL

PostPosted:Wed Jun 06, 2018 2:37 pm
by lnovoa
That is the cause, the connection driver with the mysql supports up to the previous version.
You have to install the version mysql 5.7.22 and uninstall the current one.

Once done, do the following steps:

1. Stop openkm
2. execute the following as the root user in the bbdd:
Code: Select all
CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER openkm@localhost IDENTIFIED BY 'password!!';
GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;
3. You delete the tomcat repository directory
4. change in the openkm.cfg
hibernate.hbm2ddl = none -> hibernate.hbm2ddl = create
5. Start tomcat

Re: Cannot connect to MYSQL

PostPosted:Thu Jun 07, 2018 4:59 pm
by jllort
About MySQL version 8 here some clues about what might be the reason of the issue:
https://docs.openkm.com/kcenter/view/ok ... oting.html

Re: Cannot connect to MYSQL

PostPosted:Mon Jun 11, 2018 4:54 am
by cdc
Thanks alot!
It's working now.

Re: Cannot connect to MYSQL

PostPosted:Fri Jun 12, 2020 11:54 am
by shinus
hi cdc, can you please let me know how you orted this, i am having the same issue...with mysql 8.0.20, so did you uninstall and install new mysql? an older version?
if so do you have to do the whole process of tomcat installation of again? my tomcat installation is taking huge time..and the extras..

Re: Cannot connect to MYSQL

PostPosted:Tue Jun 16, 2020 2:04 pm
by jllort
When you start the application in windows usually it takes a lot of time exploding the OpenKM.war file ( I suggest take a look at the catalina.log file to check the process, in the installation folder there's extras folder what comes with mtail application what it is useful for it purpose ).

Also, I suggest take a look at troubleshooting in the OpenKM MySQL documentation section https://docs.openkm.com/kcenter/view/ok ... oting.html

Re: Cannot connect to MYSQL

PostPosted:Fri Sep 03, 2021 7:54 am
by folksur
I am able to connect to MYSQL through Command Line. And bin folder is present in the PATH.surveyzop

Re: Cannot connect to MYSQL

PostPosted:Sat Sep 04, 2021 4:38 pm
by jllort
* What is the error shown in the openkm.log? can you share?
* Check the connection URL ( localhost, port, user, password ), ensure everything is right in the server.xml
* Check if you have enabled SSL or is shown some error in this direction in the openkm.log file ( log usually show relevant information about errors )
* Are OpenKM and MySQL installed on the same server?