Skip to content
Other versions

Loading…

Configuring MySQL

DROP DATABASE IF EXISTS okmdb;
CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER openkm@localhost IDENTIFIED BY '*secret*';
GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;

You can check the database engine with the following:

Terminal window
$ mysqlshow -h localhost -u root -p --status okmdb;

More information at MySQL: Case Sensitivity in String Searches

Edit the file $TOMCAT_HOME/openkm.properties

spring.jpa.hibernate.ddl-auto=create-only
spring.jpa.properties.hibernate.dialect=com.openkm.db.dialect.MySQLDialect

Edit the file $TOMCAT_HOME/openkm.properties and enable the resource named JDBC/OpenKMDS

spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8&nullNamePatternMatchesAll=true&serverTimezone=Europe/Madrid
spring.datasource.username=openkm
spring.datasource.password=*secret*

Edit the file $TOMCAT_HOME/openkm.properties

authentication.openkm.database=true

At OpenKM startup, the application will automatically create an empty database structure.

Remove and create MySQL service on Windows.

Section titled “Remove and create MySQL service on Windows.”

If you have a MySQL Windows service, you can remove it with one of these command lines:

Terminal window
c:\> mysqld --remove MySQL57

or

Terminal window
c:\> sc delete MySQL57

Create the service:

Terminal window
c:\> "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe" --install MYSQL57 --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini"