Issue
- Prerequisites
- Install and configure the MySQL server
- Edit the MySQL configuration file (my.ini)
- MySQL data storage recommendations
- Move the MySQL data and temporary folders to a dedicated volume (partition)
- Upgrade MySQL server
Solution
Prerequisites
- Install Microsoft .NET Framework version 4 if required by the OS
Install and configure the MySQL server
-
Download the MySQL server installation file for Windows and run the installation file.
-
On the Choosing a Setup Type screen, select Server-only and click Next.
-
Continue in the MySQL Installer until you reach the Type and Networking screen. In the Config Type field on the screen, select Dedicated Computer. Under Connectivity, type your preferred port numbers (or use the pre-selected default ports) and click Next.
-
On the Authentication Method screen, select your preferred authentication method and click Next.
-
On the Accounts and Roles screen, set the MySQL Root Password. Add a MySQL database admin user: click Add User, type a name, select the DB Admin role, set a password for the user and click OK. Click Next.
-
On the Windows Service screen, select the check boxes next to Configure MySQL Server as a Windows Service and Start the MySQL Server at System Startup and click Next.
-
On the Server File Permissions screen, select the option starting with Yes, grant full access and click Next.
-
On the Apply Configuration screen, click Execute.
-
Click Finish.
-
Click Next → Finish.
Edit the MySQL configuration file (my.ini)
-
Back up the current MySQL configuration file (
my.ini). The file is typically located inC:\ProgramData\MySQL\MySQL Server {version}. -
Open the
my.inifile. Locate the following parameters and modify their values as specified below. If a parameter is not present, add it at the end of the file.Common (MySQL 5 and 8)
open_files_limit—set to at least30000innodb_flush_log_at_trx_commit—set to 0innodb_buffer_pool_size—set to 80% of available RAM (minimum 1 GB); example for a server with 16GB RAM:innodb_buffer_pool_size=12Gmax_connections=300slow-query-log=0local_infile=1wait_timeout=900disable-log-bin(disables binary logging; useskip-log-binif preferred)
MySQL 8
innodb_redo_log_capacity—set to the value ofinnodb_buffer_pool_sizeMySQL 5
innodb_log_file_size—set to 50% of the value ofinnodb_buffer_pool_sizeevent_scheduler=ON
-
Save the changes to the
my.inifile and restart the MySQL service. To restart the service, run Command Prompt as Administrator and execute the following commands:net stop mysql net start mysqlTo check whether the MySQL service is running, run:
sc query mysqlReplace
mysqlwith your service name—for example,mysql80(MySQL 8.0) ormysql57(MySQL 5.7), depending on your installation.
MySQL data storage recommendations
The MySQL database is a crucial component of ESET Inspect Server and can occupy a significant amount of disk space. To ensure operating system stability and maintain performance, we recommend that you move the MySQL data and temporary folders to a dedicated volume (partition) or a separate server.
ESET Inspect On-Prem monitors disk space in the following locations:
- MySQL data folder—where MySQL stores the ESET Inspect Database (
datadirinmy.ini) - MySQL temporary folder—where MySQL stores temporary tables (
tmpdirinmy.ini) - ESET Inspect Server data folder—typically located at
C:\ProgramData\ESET\Inspect Server\Server
If the MySQL database runs on the same machine as ESET Inspect Server, ESET Inspect On-Prem stops accepting new events when:
- Less than 3% of free space remains on the disk with the MySQL data folder
- Less than 3% of free space remains on the disk with the MySQL temporary folder
- Less than 5% of free space remains on the disk with the ESET Inspect Server data folder
If the ESET Inspect Server data folder and the MySQL temporary folder share the same disk, ESET Inspect On-Prem stops accepting new events when free space on the disk drops below 10%.
When the MySQL database is hosted on the same machine as ESET Inspect On-Prem, ensure at least 10% free space on the disk containing the MySQL temporary folder for the purge process to function correctly. Any purge-related issues are indicated by red markers in the Events processed and stored per computer chart on the Events Load tab of the Dashboard in ESET Inspect On-Prem.
Move the MySQL data and temporary folders to a dedicated volume (partition)
-
Ensure that a dedicated volume (partition) is available on the machine hosting the MySQL server.
-
Stop the MySQL service. To stop the service, run Command Prompt as Administrator and execute the following command:
net stop mysqlTo check whether the MySQL service is running, run:
sc query mysqlReplace
mysqlwith your service name—for example,mysql84(MySQL 8.4) ormysql57(MySQL 5.7), depending on your installation. -
Move the MySQL data folder to the dedicated volume (partition), for example, to
E:\. The data folder is typically located atC:\ProgramData\MySQL\MySQL Server {version}\Data. To verify its location, open the MySQL configuration file (my.ini), typically located inC:\ProgramData\MySQL\MySQL Server {version}, and search fordatadir, which specifies the location path. -
Open the
my.inifile and updatedatadirto point to the new location of the MySQL data folder, for example,datadir=E:\Data. -
Make the MySQL data folder accessible by the Network Service, which is required for the MySQL service to start and function correctly on Windows:
-
Go to the new location of the MySQL data folder.
-
Right-click the data folder and select Properties.
-
In the Data Properties window, click the Security tab.
-
Click Edit → Add.
-
In the Enter the object names to select field, type
Network Serviceand click Check Names. The name should be underlined, indicating it is recognized. Click OK. -
With NETWORK SERVICE selected under Group or user names, select the checkbox under Allow for Full control and click OK → OK.
-
-
Move or create the MySQL temporary folder:
-
If you already have a MySQL temporary folder, move it to a dedicated volume (partition), for example, to
E:\. Otherwise, create the folder (for example,E:\MySQLTemp). The temporary folder should not be located inside the MySQL data folder; however, it can be placed on the same volume (partition) or a separate one, if available. -
Open the
my.inifile and check whether thetmpdirvariable is present. If not present, add the variable under[mysqld]. Settmpdirto point to the new temporary folder, for exampletmpdir=E:\MySQLTemp.
-
-
Save the changes to the
my.inifile and start the MySQL service. To start the service, run Command Prompt as Administrator and execute the following command:net start mysqlTo check whether the MySQL service is running, run:
sc query mysqlReplace
mysqlwith your service name—for example,mysql80(MySQL 8.0) ormysql57(MySQL 5.7), depending on your installation.
Upgrade MySQL server
To upgrade the MySQL server for ESET Inspect On-Prem server, follow the steps below:
-
Before you begin, use the migration guide to back up the ESET Inspect database.
-
Uninstall the current MySQL server version from the machine. To uninstall, press Windows key + X → Installed Apps, select the MySQL Server X.X from the list of installed applications and click ... → Uninstall. Finish the uninstallation wizard.
-
Download and install the supported version of MySQL Server.
-
Edit the MySQL configuration file (
my.ini) according to the instructions in this article. -
Create the purge tablespace and restore the ESET Inspect database from backup according to the migration guide.