Installing and configuring MariaDB

Learn how to install and configure MariaDB for Edge Flow Manager. MariaDB should act as a drop-in binary for MySQL, so its configuration should be very similar.

For more information about supported database versions, see System Requirements for Edge Flow Manager.

Install MariaDB

If you are using MySQL or PostgreSQL instead of MariaDB, you can skip these steps and use the MySQL and PostgreSQL instructions in their respective sections.
  1. Log in to the machine where you want to install MariaDB for the Edge Flow Manager server.
  2. Install MariaDB.
    1. Install MariaDB and the MariaDB server.
    2. Start the MariaDB service.

    For detailed installation instructions, see Getting, Installing, and Upgrading MariaDB.

  3. Reset the MariaDB root password using the following command.
    /usr/bin/mysql_secure_installation

    MariaDB prompts you to set a new password.

  4. Download the MariaDB JDBC connector driver from the MariaDB Connector/J docmentation.
    Cloudera recommends selecting the platform-independent archive. Extract the archive and copy the connector JAR to the Edge Flow Manager lib directory.
    /path/to/efm-1.4.0/lib/

Configure MariaDB for use by Edge Flow Manager

  1. Launch the MySQL shell.
    mysql -u root -p
  2. Create the database for the Edge Flow Manager service to use.
    CREATE DATABASE efm CHARACTER SET latin1;
  3. Create the efm user account, replacing the final IDENTIFIED BY string with your password.
    CREATE USER 'efm'@'%' IDENTIFIED BY 'efmPassword';
  4. Assign privileges to the efm account.
    GRANT ALL PRIVILEGES ON efm.* TO 'efm'@'%';
  5. Commit the changes.
    FLUSH PRIVILEGES;

Configure the Edge Flow Manager database properties

  1. Configure the database properties in the efm.properties file.
    efm.db.url=jdbc:mariadb://localhost:3306/efm?useMysqlMetadata=true
    efm.db.driverClass=org.mariadb.jdbc.Driver
    efm.db.username=efm
    efm.db.password=efmPassword
    The URL should match the host and port of the machine running MariaDB. The password should match the value that you set using the following command:
    CREATE USER 'efm'@'%' IDENTIFIED BY 'efmPassword';