[KB8593] ESET Inspect database migration for MySQL server

Issue

Solution

ESET Security Services for ESET Inspect On-Prem and ESET Inspect

ESET offers various security service packages and additional support for these products. Support for ESET Inspect On-Prem and ESET Inspect is limited and managing rules or exclusions are not included without an ESET Security Service package. Contact a sales representative for further assistance.

Prerequisites 

  • Source and target SQL Server instances must be installed
  • The target SQL Server instance must have at least the same version as the source instance
  • Downgrading is not supported
  • You can run the commands from the Source or Target machine if those machines are in the same network and the ping between those machines is working
  • You must manually move the backup file to the target machine if they are not in the same network

In the commands, configuration files, or SQL statements below, always replace the following: 

  • SRCHOST with the address of the source database server
  • SRCROOTLOGIN with the source MySQL server root user login
  • SRCEEIDBNAME with the name of the source ESET Inspect Server database to back up
  • TARGETHOST with the address of the target database server
  • TARGETROOTLOGIN with the target MySQL server root user login

Follow the instructions below to migrate the ESET Inspect Server database between different SQL Server instances (this also applies when relocating to a different SQL Server version or when migrating to a SQL Server hosted on a different machine).

  1. Stop the ESET Inspect Server service.

  2. Based on the MySQL version you have installed, navigate to C:\Program Files\MySQL\MySQL Server 5.7\bin or C:\Program Files\MySQL\MySQL Server 8\bin.

  3. Create a full database backup of the source ESET Inspect Server database (the database you plan to migrate):

    mysqldump --host SRCHOST --user=SRCROOTLOGIN --password --events --opt --routines --triggers --databases SRCEEIDBNAME --default-character-set=utf8mb4 --result-file="C:\USERS\public\BACKUPFILE.sql"

  4. Type the root login password. You can also add it directly after the --password parameter ( --password=ABCD ).

  5. Adjust the my.ini file on the target machine based on the version of MySQL you are using. Version 5.7 or 8.

  6. Restore the database on the target MySQL server.

    mysql --host TARGETHOST --user=TARGETROOTLOGIN --password < "C:\USERS\public\BACKUPFILE.sql"

  7. Type the root login password. You can also add it directly after the -p parameter ( -pABCD ).

  8. Run the ESET Inspect Server service if the target MySQL Server machine keeps the same IP address and name of the database as the Source one.

  9. When you migrate the database to another server (MySQL IP or port are changed) or change the database name (MySQL IP and port are the same, but database name changed), you have to set up the ESET Inspect Server again by using the "Repair/Change" option in the Installer. Leave all the settings as they are, but change the database settings like MySQL IP, port, or database name.