Installing MySQL

Learn how to install a MySQL external database for NiFi Registry.

If you have already installed a PostgreSQL database, you may skip these steps. Both databases are not required.

For a list of supported MySQL databases, see Supported NiFi Registry databases.

  1. Log in to the node on which you want to install NiFi Registry.
  2. Install MySQL and the MySQL community server, and start the MySQL service:
    yum localinstall https://dev.mysql.com/get/mysql[***MYSQL_VERSION***]-community-release-el[***RHEL_VERSION***]-[***PACKAGE_VERSION***].noarch.rpm
    yum install mysql-community-server
    systemctl start mysqld.service
    

    You can replace the placeholders with the appropriate values for your specific use case:

    • [***MYSQL_VERSION***]: Replace this with the desired MySQL version.
    • [***RHEL_VERSION***]: Replace this with the Red Hat Enterprise Linux (RHEL) version you are using.
    • [***PACKAGE_VERSION***]: Replace this with the specific package version.
    For example, if you want to install the MySQL 8.0 Community Edition repository configuration package on a RHEL 8 system, you would use:
    yum localinstall https://dev.mysql.com/get/mysql80-community-release-el8-8.noarch.rpm
  3. Obtain the randomly generated MySQL root password:
    grep 'A temporary password is generated for root@localhost' \
    /var/log/mysqld.log |tail -1
  4. Reset the MySQL root password.
    Enter the following command:
    /usr/bin/mysql_secure_installation

    You are then prompted for the password you obtained in the previous step. MySQL then asks you to change the password.

Once you have completed the MySQL installation, configure it for use with NiFi Registry.