Install MySQL

From FMR Knowledge Base
Revision as of 08:22, 13 October 2022 by Plazarou (talk | contribs) (Installing MySQL 5.7)
Jump to navigation Jump to search

Overview

MySQL may be used to act as the persistant store for Registry information. However the JDBC driver that communicates from the Registry to a MySQL instance is not provided within FMR (since FMR version 11.4.0) and must be obtained by a Systems Administrator.

It is also permitted to use a MySQL equivalent service like MariaDB. It must be MySQL 5.7 compatible.

Installing MySQL 5.7

It is beyond the scope of this article to explain how to install MySQL, but at the current time of writing the community edition of MySQL Server may be downloaded for free.

The MySQL instance must be accessible to the FMR and FMR will need an database account that can create, update and modify tables.

Obtaining and Specifying the MySQL JDBC Driver

To get FMR to communicate succesfully with a MySQL database, there are three tasks to perform:

  1. Obtain the correct dependency file
  2. Supply this to your Java Web Server (e.g. Tomcat) that you are using to run FMR.
  3. Specify the appropriate Credentials to FMR.

Obtaining the MySQL Connector Dependency

The ‘jar’ file is not included as part of the FMR distribution so must be obtained and installed separately prior to starting the application.


Driver Installation

The MySQL connector jar must be supplied via the Java CLASSPATH.

The recommended option is to add the filesystem location of the jar to the CLASSPATH of the application server. If using Apache Tomcat, this can be done by setting the CLASSPATH environment in the Tomcat ~/bin/setenv.sh script.

For example:

 CLASSPATH=/home/oracle/jdbc/ojdbc8.jar

where /home/oracle/jdbc is the directory containing the ‘ojdbc8.jar’ file.


Connection Details

FMR requires a database to be specified on the first page of the Install Wizard. This can be changed at a later from the Administrator "Database Settings" page.

Oracle by default uses port 1521.

If you wish to make a custom connection to Oracle, the information you will likely need is:

Connection String Of the form:

jdbc:oracle:thin:@server url>:<server port>/<oracle schema>
e.g. jdbc:oracle:thin:@localhost:1521/orcl12c

Dialect org.hibernate.dialect.Oracle10gDialect
Class Name oracle.jdbc.driver.OracleDriver

Using FMR 11.4 or later versions

As from Verion 11.4, if you are using MySQL you will need to obtain the MySQL connector as discussed in this article.

Having obtained the connecter you will need to make a change to the fine sertenv.bat as detailed in this article.

Creating the Fusion Metadata Registry schema

We recommend that you create a dedicated schema for Fusion Metadata Registry to use. You can do that using the mysqlsh command line interface, but a simple option is to install the MySQL Workbench which provides a graphical user interface for Windows users.

MySQL Workbench GUI

Download and install MySQL Workbench.

Using MySQL Workbench, connect to your MySQL database service and create a new schema. There's a button on the toolbar to do that.

MySql Workbench

It's usual to give the schema a name like fusion_metsdata_registry, but there's no restrictions so call it what you like. You'll tell Fusion Metadata Registry the name of the schema to use during the install process.

New Installations of FMR

If you are implementing a new installation of Fusion Metadata Registry, having installed MySQL the next step is to to complete the installation process More.