Use MySQL or MariaDB as your repository database (Manual installation)

Legacy page. Content moved to the main topic.

circle-info

This page is kept for existing links. Go to Manual installation process.

Install MySQL or MariaDB as the host database for the Pentaho Server repository.

Before you begin

Prerequisites

Prepare your environment first:

Repository components

The Pentaho Repository resides on the database you installed during environment setup.

It includes these components:

  • Jackrabbit Contains the solution repository, examples, security data, and report content data.

  • Quartz Stores scheduler data for reports and jobs.

  • Hibernate Stores audit logging data.

  • (Optional) Pentaho Operations Mart Stores system usage and performance data.

Initialize the MySQL or MariaDB Pentaho Repository database

Run SQL scripts to create the Hibernate, Quartz, Jackrabbit (JCR), and Operations Mart components.

circle-exclamation
circle-exclamation
circle-exclamation

If Quartz is not upgraded, the server can fail at startup.

This exception is generated in catalina.log:

Step 1: Change default passwords

For production, change the default passwords in the SQL scripts.

circle-info

If you are evaluating Pentaho, you might skip this step.

  1. Browse to <your-pentaho-directory>/pentaho-server/data/mysql.

  2. Update these scripts for your user, password, database, and other required values:

    • create_jcr_mysql.sql

    • create_quartz_mysql.sql

    • create_repository_mysql.sql

    • pentaho_mart_mysql.sql

  3. Save and close the files.

Step 2: Run SQL scripts

When upgrading from older versions (including 10.2.0.0 GA), initialize a new Quartz database. This creates the Quartz 2.x tables.

circle-info

You might need administrator permissions on the host OS.

  1. If the Pentaho Server is running, stop it. See Stop and start the Pentaho Server and repository.

  2. Make sure your MySQL or MariaDB instance is running.

  3. Open a MySQL/MariaDB prompt or MySQL Workbench. Then run the scripts in this order:

    1. <your-pentaho-directory>/pentaho-server/data/mysql/create_jcr_mysql.sql

    2. <your-pentaho-directory>/pentaho-server/data/mysql/create_quartz_mysql.sql

    3. <your-pentaho-directory>/pentaho-server/data/mysql/create_repository_mysql.sql

    4. <your-pentaho-directory>/pentaho-server/data/mysql/pentaho_mart_mysql.sql

    This creates:

    • Quartz scheduler tables prefixed with QRTZ6_

    • Jackrabbit tables

    • Repository tables

    • (Optional) Operations Mart tables

    Any existing QRTZ5_ tables are retained. If you start the server now, the schedule is empty.

  4. If you want to retain existing schedules, open migrate_old_quartz_data_mysql.sql.

  5. Update the migration script as needed. Then save it.

  6. Run:

    <your-pentaho-directory>/pentaho-server/data/mysql/migrate_old_quartz_data_mysql.sql

circle-info

The original QRTZ5_ tables are retained. Delete them only after you confirm migration success.

Step 3: Verify MySQL or MariaDB initialization

circle-info

Unless you changed it in Step 1, the default password is password.

  1. Open MySQL Workbench.

  2. Log in as hibuser.

  3. Under Schemas, expand hibernate > Tables. Verify you see tables.

  4. If you installed Operations Mart, expand pentaho_operations_mart > Tables. Verify tables.

  5. Log in as jcr_user.

  6. Under Schemas, expand jackrabbit > Tables. Verify tables.

    circle-info

    Jackrabbit tables might not appear until the first server start.

  7. Log in as pentaho_user.

  8. Under Schemas, expand quartz > Tables. Verify tables.

  9. Exit MySQL Workbench.

Configure the MySQL or MariaDB Pentaho Repository database

Configure Quartz, Hibernate, Jackrabbit, and Operations Mart.

The examples assume MySQL on port 3306 with default passwords.

circle-exclamation

Step 1: Set up Quartz on MySQL or MariaDB

Quartz stores scheduler event data, such as scheduled reports.

You point Pentaho at the correct JobStore by updating quartz.properties.

  1. Open pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties.

  2. In #_replace_jobstore_properties, set org.quartz.jobStore.driverDelegateClass:

  3. Save the file.

Step 2: Set Hibernate settings for MySQL or MariaDB

Hibernate settings point Pentaho to the correct Hibernate configuration file.

circle-info

Hibernate also stores the audit logs used by Operations Mart.

Files are in pentaho/server/pentaho-server/pentaho-solutions/system/hibernate.

  1. Open hibernate-settings.xml.

  2. Find the <config-file> entry. Replace postgresql.hibernate.cfg.xml with mysql5.hibernate.cfg.xml:

    From:

    To:

  3. Save and close the file.

  4. (MariaDB only) Open mysql5.hibernate.cfg.xml.

  5. Change the driver class:

    From:

    To:

Step 3: Replace the audit log file with the MySQL version

Replace audit_sql.xml with the MySQL version.

Use the same file for MariaDB.

  1. Locate pentaho-solutions/system/dialects/mysql5/audit_sql.xml.

  2. Copy it into pentaho-solutions/system.

Step 4: Modify Jackrabbit repository information for MySQL or MariaDB

Update Jackrabbit to use the MySQL (or MariaDB) repository.

  1. Open pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit/repository.xml.

  2. Uncomment the MySQL lines.

  3. Comment out the MS SQL Server, Oracle, and PostgreSQL lines.

  4. Verify these sections use the MySQL values.

Repository

DataStore

Workspaces

PersistenceManager (workspaces)

Versioning

PersistenceManager (versioning)

DatabaseJournal

Perform Tomcat-specific connection tasks

Configure Tomcat to connect to Hibernate, Jackrabbit, and Quartz.

circle-info

Pentaho Server is configured for Tomcat by default. Modify context.xml only if you changed ports or passwords.

Step 1: Download the driver and apply it to the Pentaho Server

You need a JDBC driver for your repository database.

circle-info

Due to licensing restrictions, you must download some drivers yourself.

  1. Download a JDBC driver JAR from your database vendor or a third-party provider. See JDBC drivers reference.

  2. Copy the driver JAR to pentaho/server/pentaho-server/tomcat/lib.

  3. If you want to keep the sample data, copy hsqldb-2.3.2.jararrow-up-right to pentaho-server/tomcat/lib.

Step 2: Modify JDBC connection information in the Tomcat context XML file

Database connection information is stored in context.xml.

circle-exclamation
  1. Use your database documentation to confirm:

    • JDBC driver class name

    • JDBC connection string format

  2. Open server/pentaho-server/tomcat/webapps/pentaho/META-INF/context.xml.

  3. Add resource entries if they do not exist already.

  1. Update usernames, passwords, hostnames, and ports to match your environment.

  2. Comment out resource entries for databases you are not using.

  3. Verify validationQuery="select 1" is correct for your database.

  4. Save context.xml.

Next steps

Continue with Configure and start the Pentaho Server after manual installation.

Last updated

Was this helpful?