Appendix C: Moving MySQL’s data directory if Nuix Adaptive Security is installed

Nuix provides an example configuration file for MySQL that does not change the default data directory. Nuix recommends the data directory be changed to a secondary drive such as D:\ dedicated to MySQL after MySQL is installed and before Nuix Adaptive Security is installed. If the data directory must be changed after Nuix Adaptive Security is installed, Nuix Adaptive Security must be reinstalled.

Use the following procedure to move the data directory and reinstall Nuix Adaptive Security.

Stop the Nuix Adaptive Security Server:

Bring up the services panel for Windows server.  Find Nuix Adaptive Security Endpoint Server and stop it.

Stop all Nuix micro services (preferred order below).

Long Running Services

Auditing

API

Identity

Discovery

Consul

Stop MySQL.

Copy all existing MySQL data from the current data location (default is C:\ProgramData\MySQL\MySQL Server 8.0\Data) to your new location.

Modify the my.ini file to point to the new MySQL data location.

Default location is c:\ProgramData\MySQL\MySQL Server 8.0\my.ini

Edit the file and modify the “datadir” parameter to point to the new location.

Do not delete the original data directory.

Preserving Agent Connectivity.  In order to preserve connectivity for existing agents to report into the new server make a backup copy of the encryption keys. This is a cautionary step.

In this directory: C:\Program Files\Nuix\Adaptive Security\Endpoint Server\Data create a separate directory to save the encryption materials.

To preserve agent connectivity, move the following ".key" files to the directory created in step a.

ca.key

ca.cert.pem

dhparam4096.pem

server.cert.pem

server.key.pem

Uninstall the Nuix Microservices.

Go to the Add/Remove Programs control panel, filter by "Nuix" and uninstall everything by clicking and selecting "Uninstall".

If you uninstalled the Consul service, delete C:\ProgramData\Nuix\Endpoint\Data\Consul and its contents.

Do not delete C:\ProgramData\Nuix\Endpoint\Data\Certificates and/or its contents.

(Optional) Delete old log files.

Open IIS Manager and stop the Adaptive Security App Pool.

Manually remove the old Nuix Adaptive Security Endpoint Service from the command line with “sc delete NuixEPS”.

Delete the Adaptive web site and Adaptive application pool. Open IIS Manager.

Under Sites - right click on "Adaptive" and choose remove.

In "Application Pools" right click on adaptive and choose remove.

Go to "C:\inetpub".

Delete the Adaptive Program.

Start MySQL.

At this point you should be able to install a fresh version of the Adaptive Security Endpoint Server.

Run the Nuix Adaptive Security server installer.

When you get to the installation page where the ca.pem key is specified, browse to the new data directory you copied your MySQL data to, and select the ca.pem file.

Continue the installation as normal.