Installing and configuring MariaDB
Learn how to install and configure MariaDB for Edge Flow Manager (EFM). MariaDB should act as a drop-in binary for MySQL so configuration is very similar.
For supported database versions, see System Requirements for EFM.
If you want to use MySQL, PostgreSQL, or OracleDB instead of MariaDB, you may skip these steps. See the relevant installation instructions in the respective sections.
Installing MariaDB
- Log in to the machine on which you want to install MariaDB to use for the EFM server.
- Install MariaDB and the MariaDB server, and start the MariaDB service.
For install instructions, check https://mariadb.com/kb/en/getting-installing-and-upgrading-mariadb/.
- Use the following command to reset the MariaDB root
password:
/usr/bin/mysql_secure_installation
MariaDB then asks you to change the password.
- Download the MariaDB JDBC connector and place it in the EFM lib
directory:
/path/to/efm-1.4.0/lib/
- Download the MariaDB database driver from https://mariadb.com/kb/en/about-mariadb-connector-j/.
Configuring MariaDB for EFM
- Launch the MySQL shell:
mysql -u root -p
- Create the database for the EFM service to
use:
CREATE DATABASE efm CHARACTER SET latin1;
- Create the efm user account, replacing the final
IDENTIFIED BY
string with your password:CREATE USER 'efm'@'%' IDENTIFIED BY 'efmPassword';
- Assign privileges to the
efm
account:GRANT ALL PRIVILEGES ON efm.* TO 'efm'@'%';
- Commit the operation:
FLUSH PRIVILEGES;
Configuring EFM database properties
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';