LSPS documentation logo
LSPS Documentation
Setting up the Database

LSPS requires an lsps database with a dedicated user to store its system data. To set up such a database, do the following:

  1. Make sure the database is supported by your application server.
  2. Create a database with the character encoding to UTF-8.

    Example MySQL database setup with UTF-8

    CREATE USER 'lsps' IDENTIFIED BY 'lsps';
    CREATE DATABASE lsps DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
    GRANT ALL PRIVILEGES ON lsps.* TO lsps@'';
    GRANT XA_RECOVER_ADMIN ON *.* TO 'lsps'@''; -- not on MySQL 5
    SET GLOBAL log_bin_trust_function_creators = 1; -- not on MySQL 5
    FLUSH PRIVILEGES;
  3. Initialize the database with the db-migration tool from the runtime suite:
    cli-tools$ java -jar lsps-db-migration-lsps-<VERSION>-full.jar --databaseUrl <DATABASE_URL> --user <DB_USER> --password <ESCAPED_DB_PASSWD>
    (refer to documentation of the lsps-database migration script).
  4. Initialize the database for the LSPS or other libraries you are going to use. For example, if you are planning to use the BAM Library, initialize the tables with bam-migration:
    cli-tools$ java -jar lsps-bam-migration-lsps-<VERSION>-full.jar --databaseUrl <DATABASE_URL> --user <DB_USER> --password <ESCAPED_DB_PASSWD>
  5. Configure your database:
    • Microsoft SQL server:
    • On MySQL, set the allowed packet size to 512 MBs and the default time zone in the configuration file of your mysql server, typically, the my.cnf or mysqld.conf files:
      [mysqld] 
        max_allowed_packet=512M
        default_time_zone="+0:00"