Issue
- Prerequisites
- Network and file transfer requirements
- Placeholder replacement
- Migrate the ESET Inspect Server MySQL database to a different MySQL Server instance or version using the command line
Solution
Prerequisites
- Both the source and target MySQL Server instances must be installed
- The target MySQL Server instance must be the same version or later as the source MySQL Server instance; downgrading is not supported
Network and file transfer requirements
- If the source and target machines are on different networks, you must manually transfer the backup file to the target machine
- If the source and target machines are on the same network, you can run the migration commands from either the source or target machine (ensure ping connectivity works)
Placeholder replacement
In the commands, replace the placeholders as follows:
SRCHOST→ hostname or IP address of the source MySQL ServerSRCROOTLOGIN→ username of the root account on the source MySQL ServerSRCEEIDBNAME→ name of the source ESET Inspect Server databaseTARGETHOST→ hostname or IP address of the target MySQL ServerTARGETROOTLOGIN→ username of the root account on the target MySQL Server
Migrate the ESET Inspect Server MySQL database to a different MySQL Server instance or version using the command line
To migrate the ESET Inspect Server MySQL database to a different MySQL Server instance or version using the command line, follow the steps below:
-
Stop the ESET Inspect Server service.
-
Locate MySQL binaries. Navigate to the MySQL
bindirectory based on your installed version:- MySQL 5:
C:\Program Files\MySQL\MySQL Server 5.7\bin
To navigate to thebindirectory in Command Prompt, run:
cd C:\Program Files\MySQL\MySQL Server 5.7\bin - MySQL 8:
C:\Program Files\MySQL\MySQL Server 8\bin.
To navigate to thebindirectory in Command Prompt, run:
cd C:\Program Files\MySQL\MySQL Server 8\bin
- MySQL 5:
-
Create a full backup of the source ESET Inspect Server database. From the
bindirectory, in Command Prompt, run:mysqldump --host=SRCHOST --user=SRCROOTLOGIN -p --events --opt --routines --triggers --databases SRCEEIDBNAME --default-character-set=utf8mb4 --result-file="C:\USERS\public\BACKUPFILE.sql"You can include the password for
SRCROOTLOGINdirectly in the command: replace-pwith-pYourPassword. If you do not include the password, you will be prompted to type it after running the command. -
Adjust the MySQL configuration for the target MySQL Server: edit the my.ini file according to your MySQL version.
-
Log in to the target MySQL Server. In Command Prompt, run:
mysql --host=TARGETHOST --user=TARGETROOTLOGIN -pYou can include the password for
TARGETLOGINdirectly in the command: replace-pwith-pYourPassword. If you do not include the password, you will be prompted to type it after running the command. -
Create the purge tablespace. At the the
mysql>prompt, run:CREATE TABLESPACE `purge_ts` ADD DATAFILE 'purge_ts1.ibd' ENGINE=INNODB; -
Restore the ESET Inspect database on the target MySQL Server. Exit the
mysql>prompt: runexit;. In Command Prompt, run:mysql --host=TARGETHOST --user=TARGETROOTLOGIN -p < "C:\USERS\public\BACKUPFILE.sql"You can include the password for
TARGETLOGINdirectly in the command: replace-pwith-pYourPassword. If you do not include the password, you will be prompted to type it after running the command.If the location of the backup file is not
C:\USERS\public\BACKUPFILE.sql, replace it in the command with the actual location of the backup file. -
Finish the migration based on your setup:
-
If the target MySQL Server uses the same hostname/IP address and database name as the source, restart the ESET Inspect Server service.
-
If the target MySQL Server hostname/IP address, port, or database name differs from the source, run the ESET Inspect Server installer in the Repair / Change mode. Keep all settings unchanged, but update the MySQL database connection details (hostname/IP address, port, database name).
-