Configuring MySQL
Database creation
Section titled “Database creation”Create a database and user
Section titled “Create a database and user”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:
$ mysqlshow -h localhost -u root -p --status okmdb;More information at MySQL: Case Sensitivity in String Searches
Configure your openkm.properties
Section titled “Configure your openkm.properties”Edit the file $TOMCAT_HOME/openkm.properties
spring.jpa.hibernate.ddl-auto=create-onlyspring.jpa.properties.hibernate.dialect=com.openkm.db.dialect.MySQLDialectConfigure Tomcat data sources
Section titled “Configure Tomcat data sources”Edit the file $TOMCAT_HOME/openkm.properties and enable the resource named JDBC/OpenKMDS
spring.datasource.driver-class-name=com.mysql.jdbc.Driverspring.datasource.url=jdbc:mysql://localhost:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8&nullNamePatternMatchesAll=true&serverTimezone=Europe/Madridspring.datasource.username=openkmspring.datasource.password=*secret*Configure application login
Section titled “Configure application login”Edit the file $TOMCAT_HOME/openkm.properties
authentication.openkm.database=trueRun application
Section titled “Run application”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:
c:\> mysqld --remove MySQL57or
c:\> sc delete MySQL57Create the service:
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"