Page tree

 

Contents:


This section describes how to install the MySQL database server, after which you can create and initialize the databases and their users.

Limitations

NOTE: MySQL 5.7 Community is not supported on CentOS/RHEL 8.1.


  • You must install a supported version of the database. For more information on supported versions of this database type, see System Requirements in the Planning Guide.

Pre-requisites

  • The installing user must have write permissions to the directory from which the commands are executed.
  • The installing user must have sudo privileges.

Acquire MySQL Java driver

The MySQL Java driver is not packaged with the Trifacta installer. If you are installing the Trifacta databases into MySQL, please acquire the following driver files.

File 1:

mysql-connector-java-6.0.6.jar

This file can be downloaded from the following locations:

This file needs to be installed in the following locations on the Trifacta node:

/opt/trifacta/services/artifact-storage-service/build/install/artifact-storage-service/lib/mysql-connector-java-6.0.6.jar
/opt/trifacta/services/authorization-service/build/install/authorization-service/lib/mysql-connector-java-6.0.6.jar
/opt/trifacta/services/configuration-service/build/install/configuration-service/lib/mysql-connector-java-6.0.6.jar
/opt/trifacta/services/batch-job-runner/build/install/batch-job-runner/lib/mysql-connector-java-6.0.6.jar
/opt/trifacta/services/job-metadata-service/build/install/job-metadata-service/lib/mysql-connector-java-6.0.6.jar
/opt/trifacta/services/orchestration-service/build/install/orchestration-service/lib/mysql-connector-java-6.0.6.jar
/opt/trifacta/services/scheduling-service/server/build/install/scheduling-service/lib/mysql-connector-java-6.0.6.jar
/opt/trifacta/services/time-based-trigger-service/server/build/install/time-based-trigger-service/lib/mysql-connector-java-6.0.6.jar

File 2:

mysql-connector-java-5.1.37.jar

This file can be downloaded from here:

This file needs to be installed in the following location:

/opt/trifacta/services/secure-token-service/server/build/install/secure-token-service/lib/mysql-connector-java-5.1.37.jar

MySQL log_bin_trust_function_creators is required for installation

When the Trifacta databases are hosted on MySQL, for the installation process, you must enable the log_bin_trust_function_creators flag. When enabled, this flag allows MySQL to trust the creators of stored functions to not write unsafe events to the binary log. 

NOTE: This flag is a global flag in MySQL. It is only required during the installation process and can be disabled afterward.

For more information, see https://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html#sysvar_log_bin_trust_function_creators.

Select Configuration File

If you are installing the database in a MySQL instance, a separate base configuration has been provided. This configuration file is stored in the following location:

/opt/trifacta/conf/trifacta-conf.json.MYSQL_DB

To use MySQL, you should back up the default configuration file and then copy the MySQL version in its place:

If you have already applied configuration changes to trifacta-conf.json through the above file or the Admin Settings page, these changes are lost when the following steps are performed. You must manually migrate those changes over or apply the MySQL changes manually.

cp /opt/trifacta/conf/trifacta-conf.json /opt/trifacta/conf/trifacta-conf.json.POSTGRES_DB
cp /opt/trifacta/conf/trifacta-conf.json.MYSQL_DB /opt/trifacta/conf/trifacta-conf.json

Database Install

NOTE: The following distributions and commands are for MySQL Community Server 5.7.

O/S DistributionURLPackage Name
CentOS 7https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpmmysql-community-server
CentOS 8https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpmmysql-community-server
RHEL 7https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpmmysql-community-server
RHEL 8https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpmmysql-community-server
Ubuntu 16.04https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb 
Ubuntu 18.04https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb 

For CentOS 7.x:

# Install MySql Repo List
sudo wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
sudo rpm -Uvh mysql80-community-release-el7-1.noarch.rpm
# Check list of available Mysql Repos; by default 8.0 is enabled, but we want 5.7
yum repolist all | grep mysql
# Disable 8.0 and enable 5.7
sudo yum-config-manager --disable mysql80-community
sudo yum-config-manager --enable mysql57-community
# Verify repo state
yum repolist all | grep mysql
# Install Mysql Server
sudo yum install mysql-community-server
# Start mysql server
sudo systemctl start mysqld.service
# Verify status
sudo systemctl status mysqld.service

For CentOS 8.x: 

# Install MySql Repo List
sudo wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
sudo rpm -Uvh mysql80-community-release-el7-1.noarch.rpm
# Check list of available Mysql Repos; by default 8.0 is enabled, but we want 5.7
yum repolist all | grep mysql
# Disable 8.0 and enable 5.7
sudo yum-config-manager --disable mysql80-community
sudo yum-config-manager --enable mysql57-community
# Verify repo state
yum repolist all | grep mysql
# Install Mysql Server
sudo yum install mysql-community-server
# Start mysql server
sudo systemctl start mysqld.service
# Verify status
sudo systemctl status mysqld.service

For Red Hat Enterprise Linux 7.x: See CentOS 7 above.

For Red Hat Enterprise Linux 8.x: See CentOS 8 above.

For Ubuntu 16.04: 

# Install and configure repo config package
sudo apt-get update && sudo apt-get install lsb-release
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
sudo debconf-set-selections <<< "mysql-apt-config mysql-apt-config/select-server select mysql-5.7"
sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.10-1_all.deb
sudo apt-get update
# Set Installer configs Admin password and install MySql Server package 
sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/root-pass password <MYSQL_ADMIN_PASSWORD>"
sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/re-root-pass password <MYSQL_ADMIN_PASSWORD>"
sudo DEBIAN_FRONTEND=noninteractive apt-get install mysql-community-server
sudo service mysql start

For Ubuntu 18.04: 

# Install and configure repo config package
sudo apt-get update && sudo apt-get install lsb-release
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
sudo debconf-set-selections <<< "mysql-apt-config mysql-apt-config/select-server select mysql-5.7"
sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.10-1_all.deb
sudo apt-get update
# Set Installer configs Admin password and install MySql Server package 
sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/root-pass password <MYSQL_ADMIN_PASSWORD>"
sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/re-root-pass password <MYSQL_ADMIN_PASSWORD>"
sudo DEBIAN_FRONTEND=noninteractive apt-get install mysql-community-server
sudo service mysql start

Acquire Port Information

After you have completed the installation, you must acquire the port information for each database from the following locations on the Trifacta node. These port numbers need to be applied inside the Trifacta platform.

CentOS/RHEL (MySQL 5.7):

The default port is 3306.

Ubuntu (MySQL 5.7) Not supported.

Configure MySQL Timezone

If your MySQL databases are in a different timezone from the Trifacta node, you must configure the timezone value for each database, so that it can be inserted as part of the connection string. 

NOTE: If the Trifacta node and your MySQL databases are co-located in the same timezone, you can skip this section.

In the Admin Settings page, these parameters are in the following form:

"*.database.mySqlServerTimezone": "",

For each database, insert the appropriate timezone value. For more information on supported values, see the documentation for your MySQL product.

See Database Parameter Reference.

Update MySQL Password Policy

NOTE: This section only applies to CentOS and RHEL platforms only where MySQL is the installed database.

By default, MySQL enforces a stricter password policy on database passwords. If you prefer to set your own passwords outside of this policy, you must lower the password policy. Please complete the following steps:

# Get temporary root password from mysql log
sudo grep 'temporary password' /var/log/mysqld.log
# Connect to server as root
mysql -uroot -p
# Update password
ALTER USER 'root'@'localhost' IDENTIFIED BY '<my_new_password>';
# Unless you plan to update all the User passwords to be meet MySql Security requirements, you should set the password policy to low
SET GLOBAL validate_password_policy=LOW;

This page has no comments.