Use MySQL or MariaDB as your repository database (Manual installation)
Legacy page. Content moved to the main topic.
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.
Use the ASCII character set when you run these scripts. Do not use UTF-8. Script failures can occur due to string-length limits.
If you use different ports, users, or passwords, update the examples. Match your environment values.
Pentaho 10.2.0.0 and earlier use Quartz 1.x tables (QRTZ5_).
Pentaho 10.2.0.1 and later use Quartz 2.x tables (QRTZ6_).
When you upgrade to 10.2.0.1 or later, you must create the QRTZ6_ tables.
You can optionally migrate existing schedules using the migration script.
If you run repository SQL scripts on an upgraded system, you can reset data. Back up before you proceed.
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.
If you are evaluating Pentaho, you might skip this step.
Browse to
<your-pentaho-directory>/pentaho-server/data/mysql.Update these scripts for your user, password, database, and other required values:
create_jcr_mysql.sqlcreate_quartz_mysql.sqlcreate_repository_mysql.sqlpentaho_mart_mysql.sql
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.
You might need administrator permissions on the host OS.
Back up your data. See Back up your existing Pentaho products and install Pentaho 11.0.
If the Pentaho Server is running, stop it. See Stop and start the Pentaho Server and repository.
Make sure your MySQL or MariaDB instance is running.
Open a MySQL/MariaDB prompt or MySQL Workbench. Then run the scripts in this order:
<your-pentaho-directory>/pentaho-server/data/mysql/create_jcr_mysql.sql<your-pentaho-directory>/pentaho-server/data/mysql/create_quartz_mysql.sql<your-pentaho-directory>/pentaho-server/data/mysql/create_repository_mysql.sql<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.If you want to retain existing schedules, open
migrate_old_quartz_data_mysql.sql.Update the migration script as needed. Then save it.
Run:
<your-pentaho-directory>/pentaho-server/data/mysql/migrate_old_quartz_data_mysql.sql
The original QRTZ5_ tables are retained.
Delete them only after you confirm migration success.
Step 3: Verify MySQL or MariaDB initialization
Unless you changed it in Step 1, the default password is password.
Open MySQL Workbench.
Log in as
hibuser.Under Schemas, expand hibernate > Tables. Verify you see tables.
If you installed Operations Mart, expand pentaho_operations_mart > Tables. Verify tables.
Log in as
jcr_user.Under Schemas, expand jackrabbit > Tables. Verify tables.
Jackrabbit tables might not appear until the first server start.
Log in as
pentaho_user.Under Schemas, expand quartz > Tables. Verify tables.
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.
If your ports or passwords differ, update the examples. Match your environment values.
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.
Open
pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties.In
#_replace_jobstore_properties, setorg.quartz.jobStore.driverDelegateClass:Save the file.
Step 2: Set Hibernate settings for MySQL or MariaDB
Hibernate settings point Pentaho to the correct Hibernate configuration file.
Hibernate also stores the audit logs used by Operations Mart.
Files are in pentaho/server/pentaho-server/pentaho-solutions/system/hibernate.
Open
hibernate-settings.xml.Find the
<config-file>entry. Replacepostgresql.hibernate.cfg.xmlwithmysql5.hibernate.cfg.xml:From:
To:
Save and close the file.
(MariaDB only) Open
mysql5.hibernate.cfg.xml.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.
Locate
pentaho-solutions/system/dialects/mysql5/audit_sql.xml.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.
Open
pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit/repository.xml.Uncomment the MySQL lines.
Comment out the MS SQL Server, Oracle, and PostgreSQL lines.
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.
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.
Due to licensing restrictions, you must download some drivers yourself.
Download a JDBC driver JAR from your database vendor or a third-party provider. See JDBC drivers reference.
Copy the driver JAR to
pentaho/server/pentaho-server/tomcat/lib.If you want to keep the sample data, copy
hsqldb-2.3.2.jartopentaho-server/tomcat/lib.
Step 2: Modify JDBC connection information in the Tomcat context XML file
Database connection information is stored in context.xml.
If your port, password, user, driver class, or host differs, update the examples. Match your environment values.
Use your database documentation to confirm:
JDBC driver class name
JDBC connection string format
Open
server/pentaho-server/tomcat/webapps/pentaho/META-INF/context.xml.Add resource entries if they do not exist already.
Update usernames, passwords, hostnames, and ports to match your environment.
Comment out resource entries for databases you are not using.
Verify
validationQuery="select 1"is correct for your database.Save
context.xml.
Next steps
Continue with Configure and start the Pentaho Server after manual installation.
Last updated
Was this helpful?

