Installing and Configuring MySQL

You can install and configure MySQL. For supported database versions, see System Requirements.

Install MySQL

If you are using PostgreSQL instead of MySQL, you may skip these steps. See the instructions for PostgreSQL in the next section.

  1. Log in to the machine on which you want to install the MySQL metastore to use for the EFM Server.
  2. Install MySQL and the MySQL community server, and start the MySQL service. For install instructions, check https://dev.mysql.com/doc/refman/5.7/en/installing.html.
  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. You are prompted for the password you obtained in the previous step. MySQL then asks you to change the password.
    /usr/bin/mysql_secure_installation
  5. Download the MySQL JDBC Connector and place it in the EFM lib directory: /path/to/efm-1.1.0/lib/.

    Download the MySQL database driver from https://dev.mysql.com/downloads/connector/j/.

    It is recommended to select the Platform Independent offering, download one of the archives, extract, and then copy the connector JAR to the lib directory.

Configure MySQL for use by EFM

  1. Launch the MySQL shell:
    mysql -u root -p
  2. Create the database for the CEM metastore:
    CREATE DATABASE efm CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  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 PRIVLEGES ON EFM.* TO 'efm'@'%';
  5. Commit the operation:
    FLUSH PRIVILEGES;

Configure the EFM database properties

  1. Configure the database properties in the efm.properties file:
    efm.db.url=jdbc:mysql://localhost/efm
    efm.db.driver.class=com.mysql.cj.jdbc.Driver
    efm.db.username=efm
    efm.db.password=efmPassword
    The password should match the value that you set using the following command:
    CREATE USER 'efm'@'%' IDENTIFIED BY 'efmPassword';