MySQL installation and configuration

Installation

validation-status-icon-error WARNING

MySQL database is supported up to version 5.7 and ODBC driver up to version 5.3.10. Upgrading to a higher version (5.3.11 or 8.x) of MySQL and ODBC driver is not recommended.

The ESMC Virtual Appliance is running ODBC 8.0.11-el7. From the 8.x versions, only this version is proven to be compatible with the ESMC. Major Linux distributions do not provide this version in their repository.

If you have already installed and configured MySQL, proceed to Configuration.

validation-status-icon-error WARNING

MariaDB is a default database in most current Linux environments and gets installed when you select to install MySQL.

MariaDB is not supported by ESET Security Management Center!

validation-status-icon-warning IMPORTANT

Please make sure to install MySQL for ESET Security Management Center to work properly. Before installing the database on Linux, add MySQL repository:

Debian, Ubuntu: Adding the MySQL APT Repository

CentOS, Red Hat, Fedora: Adding the MySQL Yum Repository

OpenSUSE, SUSE Linux Enterprise Server: Adding the MySQL SLES Repository

After adding the MySQL repository, you can proceed with MySQL installation.

Installation of MySQL differs depending on the Linux distribution and version used:

Debian and Ubuntu distributions

Use the following command to install MySQL:
sudo apt-get install mysql-server

Advanced installation: https://dev.mysql.com/doc/refman/5.7/en/linux-installation-apt-repo.html

CentOS, Red Hat and Fedora distributions

Use the following command to install MySQL:
sudo yum install mysql-server

Advanced installation: https://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html

OpenSUSE distribution

Use the following command to install MySQL:
sudo zypper install mysql-community-server

Manual installation

Download and install MySQL Community Server edition from:
http://dev.mysql.com/downloads/


Configuration

Run the following command to open the my.cnf (my.ini for Windows installation) file in a text editor:

sudo nano /etc/mysql/my.cnf
(if the file is not present, try /etc/my.cnf or /etc/my.cnf.d/community-mysql-server.cnf)

Find the following configuration in the [mysqld] section of the my.cnf file and modify the values. (If the parameters are not present in the file, add them to the [mysqld] section ):

max_allowed_packet=33M

For MySQL 5.6.20 and 5.6.21 (you can determine your MySQL version by using mysql --version):

oinnodb_log_file_size needs to be set to at least 200 MB (for example innodb_log_file_size=200M), but not more than 3000 MB

For MySQL 5.6.22 and later:

oinnodb_log_file_size*innodb_log_files_in_group needs to be set to at least 200 MB (* denotes multiplication, the product of the two parameters must be > 200 MB. The minimal value for innodb_log_files_in_group is 2 and maximum value is 100, the value also has to be integer).
For example:
innodb_log_file_size=100M
innodb_log_files_in_group=2

 

Save and close the file and enter the following command to restart the MySQL server and apply the configuration (in some cases, the service name is mysqld):

sudo service mysql restart

Run the following command to set up MySQL including privileges and password (this is optional and may not work for some Linux distributions):

/usr/bin/mysql_secure_installation

Enter the following command to check whether the MySQL server is running:

sudo netstat -tap | grep mysql

If the MySQL server is running, the following line will be displayed. Note that the process identifier - PID (7668 in the example below) may be different:

tcp   0   0 localhost:mysql    *:*         LISTEN    7668/mysqld