close

Filter

loading table of contents...

Content Server Manual / Version 2404

Table Of Contents

3.2.5 MySQL Database

For the MySQL database you need the com.mysql:mysql-connector-j driver. It is available at https://mvnrepository.com/artifact/com.mysql/mysql-connector-j, and it is preconfigured in the database-drivers pom.xml.

You should delete all other dependencies in database-drivers. They do not harm, but you do not need them, and libraries always bear the risk of introducing security vulnerabilities.

Afterwards, you can configure the database as follows:

sql.store.driver=com.mysql.cj.jdbc.Driver
sql.store.url=jdbc:mysql://localhost:3306/<user>
sql.store.user=<user>
sql.store.password=<password>

Replace <user> and <password> as appropriate. Lower case is recommended. You create a separate database and a separate user for each server as follows:

CREATE SCHEMA <user> CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER '<user>'@'localhost' IDENTIFIED BY '<password>';
CREATE USER '<user>'@'%' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON <user>.* TO '<user>'@'%', '<user>'@'localhost';

Again, replace <user> and <password>. If not properly set as indicated above, the Content Server will change the character set and the collation of the database to utf8mb4 and utf8mb4_bin during the first start.

All tables will be set up to use the InnoDB storage engine. By default, the caches for this storage engine are configured very small. Consider increasing the MySQL startup option innodb_buffer_pool_size. Also, increasing innodb_log_file_size will improve write performance, because log files are rotated less often.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.