License Type | On-Premise |
Agent Mode | N/A |
Main Product Category | Administration |
Sub Category | Distributed Installation |
Objective
Use an Azure MySQL database instance to host the Contrast database for a distributed EOP Installation.
Process
As documented in Step 6. here, the usual configuration for the Contrast database user is to grant all privileges using:
GRANT ALL PRIVILEGES ON *.* TO 'contrast'@'%';
With an Azure MySQL instance, even the admin user that is provided for managing your instance does not possess all privileges, so it will be impossible to configure the contrast user as suggested.
Instead, the maximum permission level you can set for the contrast user is as follows:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE ROLE, DROP ROLE ON *.* TO `contrast`@`%` WITH GRANT OPTION;
In addition to configuring the user as such, the following steps need also be taken to avoid potential issues:
Modify Azure MySQL Database Server Parameters
In the Azure Management Console, edit the Server Parameters for the database as follows:
- Set
max_allowed_packets
to1073741824
(this allows the database to handle larger packets and strings). - Set the
log_bin_trust_function_creators
parameter toON
. - Set the
explicit_defaults_for_timestamp
parameter toOFF
. - Set the
wait_timeout parameter
to360
(to avoid this issue).
Modify Database Connection Properties
The Azure MySQL Database instances return the incorrect MySQL version when the default port (3306) is used to connect, as detailed in this article. As the Contrast Server requires a minimum MySQL version of 5.7, this will result in an error. The workaround for this is to either:
- Use port 3308 (if your Azure MySQL instance is 5.7) or 3309 (if your Azure MySQL instance is 8.0) (recommended)
- or add the JVM option
-Dmysql.min.version=5.6.42
to the<CONTRAST_INSTALL_DIR>/bin/contrast-server.vmoptions
file.
To modify the port, edit both jdbc.url
and jdbc.port
the in the <CONTRAST_INSTALL_DIR>/data/conf/database.properties
file (details on how to edit this file are here).
If the Azure MySQL database instance requires TLS connections, please refer to the additional instructions in this article to complete the configuration.