Issue
- You need to run MySQL 8 in Linux for ESET Inspect On-Prem
- Install MySQL 8
- Database setup
- Verify MySQL service status
- Sources
Solution
Install MySQL 8
-
Open the Terminal and run the following commands:
sudo apt-get update sudo apt-get upgrade sudo apt-get install mysql-server
-
Install MySQL Workbench, which is the database GUI:
sudo apt install mysql-workbench
Database setup
-
Set up the database user for localhost and external connections and push the following SQL commands in Command line (not Workbench):
sudo mysql -u root -p create user 'root'@'%' IDENTIFIED BY 'root'; ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'admin.1'; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'admin.1'; grant all privileges on *.* to 'root'@'%' with grant option;
-
From the mysql.user menu, select host % and user root.
-
After the user is added and defined, set up the MySQL database.
mysql_secure_installation Validate password component [Y/n] n Change the root password? [Y/n] n Remove anonymous users? [Y/n] y Disallow root login remotely? [Y/n] n Remove test database and access to it? [Y/n] y Reload privilege tables now? [Y/n] y
-
We recommend changing the password from the default admin.1. The password is required during the ESET Inspect Server install.
-
Set the password through the Terminal.
-
In the Workbench, click Database → Connect to Database. Select the database and click OK.
-
Click Server → Users and Privileges. Select root%. Set and confirm the password.
-
Open the Terminal and execute the following command to copy the
mysql.service
file:sudo cp /lib/systemd/system/mysql.service /etc/systemd/system/
-
Open
/etc/systemd/system/mysql.service
in a text editor and add the following lines:sudo nano /etc/systemd/system/mysql.service LimitNOFILE=30000 LimitMEMLOCK=30000
-
Save the file and reload the system configuration by the following command:
sudo systemctl daemon-reload
-
Modify the
/etc/mysql/mysql.conf.d/mysqld.cnf
file (where the db params). Open the file in a text editor and add the following lines under section[mysqld]:
*bind-address
– default value is 127.0.0.1. Set the address to the machine's IP where MySQL is running. The ESET Inspect On-Prem install cannot connect to MySQL if the IP is incorrect.
*innodb_buffer_pool_size
—set to 80% of the RAM size of MySQL machine.
*innodb_log_file_size
—set to 40% - 60% of the innodb_buffer_pool_size value.sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf bind-address = xxx.xxx.xxx.xxx innodb_flush_log_at_trx_commit=0 innodb_buffer_pool_size=2G innodb_redo_log_capacity=2G thread_stack=256K disable-log-bin local_infile = 1 wait_timeout=900 max_connections=300
-
Restart MySQL to load the new parameters:
sudo service mysql restart
Verify MySQL Service status
-
On the terminal, type the following command:
systemctl status mysql.service
-
MySQL Service is running when the reported state is: active (running).
Sources
- MySQL Installation
- Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
- Open_files_limit
- MySQL command line commands