Configuring NiFi Registry Metadata Stores in MySQL

Learn how to configure a MySQL database for use with NiFi Registry.

MySQL provides the option to use an externally located database that supports high availability.

You have installed a MySQL database. For details, see Installing MySQL.
  1. Download the MySQL JDBC driver and place it somewhere accessible to NiFi Registry:
    /path/to/drivers/mysql-connector-java-8.0.16.jar
  2. Create a database inside MySQL (enter mysql shell using mysql -u root -p):
    CREATE DATABASE nifi_registry;
  3. Create a database user and grant privileges (for remote users, use nifireg'@'<IP-ADDRESS> or nifireg'@'% for any remote host):
    GRANT ALL PRIVILEGES ON nifi_registry.* TO 'nifireg'@'localhost' IDENTIFIED BY 'changeme';
  4. After NiFi Registry service is installed, configure the database properties in Cloudera Manager:
    • NiFi Registry JDBC Url (nifi.registry.db.url)jdbc:mysql://<MYSQL-HOSTNAME>/nifi_registry
    • NiFi Registry JDBC Driver (nifi.registry.db.driver.class) – com.mysql.cj.jdbc.Driver
    • NiFi Registry H2 directory storage location (nifi.registry.db.driver.directory) – /path/to/drivers
    • NiFi Registry Database Username (nifi.registry.db.username) – nifireg
    • NiFi Registry Database Password (nifi.registry.db.password) – changeme

When you have completed the NiFi Registry database configuration, move on to installing Cloudera Manager and your CDP Private Cloud Base Cluster.