MySQL provides the option to use an externally located database that supports high
availability.
Perform the following steps to use MySQL:
-
Download the MySQL JDBC driver and place it somewhere accessible to NiFi
Registry.
/path/to/drivers/mysql-connector-java-8.0.16.jar
-
Create a database inside MySQL (enter mysql shell using
mysql -u root
-p)
CREATE DATABASE nifi_registry;
-
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';
-
Configure the database properties in nifi-registry.properties.
nifi.registry.db.url=jdbc:mysql://<MYSQL-HOSTNAME>/nifi_registry
nifi.registry.db.driver.class=com.mysql.cj.jdbc.Driver
nifi.registry.db.driver.directory=/path/to/drivers
nifi.registry.db.username=nifireg nifi.registry.db.password=changeme
nifireg'@'<IP-ADDRESS>, or
nifireg'@'%nifireg'@'<IP-ADDRESS>,
or
nifireg'@'% for any remote host).
mysql -u
root
-p).