MySQL installation and configuration




Make sure to install a supported version of MySQL Server and ODBC Connector.

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

1.Before installing the database on Linux, add MySQL repository:

Debian, Ubuntu

Run the following commands in the Terminal:


b)sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb

See also: Adding the MySQL APT Repository

CentOS, Red Hat, Fedora

Adding the MySQL Yum Repository

OpenSuse, SUSE Linux Enterprise Server

Adding the MySQL SLES Repository

2.After adding the MySQL repository update your local repository cache (e.g. on Debian run sudo apt-get update), and you can proceed with MySQL installation.

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

Linux distribution:

MySQL Server installation command:

MySQL Server advanced installation:

Debian, Ubuntu

sudo apt-get install mysql-server

CentOS, Red Hat, Fedora

sudo yum install mysql-server

OpenSuse, SUSE Linux Enterprise Server

sudo zypper install mysql-community-server

Manual installation – download and install MySQL Community Server edition from:



1.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

2.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:


To determine your MySQL version, run the command: mysql --version

For the supported versions MySQL 8.x, you must set the following variable:


oAlternatively, you can disable binary logging: log_bin=0

For the supported versions of MySQL 8.x, 5.7 and 5.6.22 (and later 5.6.x):

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 minimum value for innodb_log_files_in_group is 2 and maximum value is 100, the value also has to be integer).
For example:

For MySQL 5.6.20 and 5.6.21:

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.

3.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

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


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

sudo service mysql status