MySQL Server installation and configuration

Installation

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

1.Download the MySQL 8 Windows installer from https://dev.mysql.com/downloads/installer/ and execute it.

2.Select the check box I accept the license terms and click Next.

3.During the installation setup, select Custom and select MySQL Server and Connector/ODBC to install. Make sure that ODBC Connector matches the bitness of the installed MySQL Server (x86 or x64).

mysql_component

4.Click Next and Execute to install the MySQL Server and ODBC Connector.

5.Click Next. In High Availability, select Standalone MySQL Server / Classic MySQL Replication and click Next.

6.In Type and Networking, select Server Computer from the Config Type drop-down menu and click Next.

7.In Authentication Method, select the recommended option Use Strong Password Encryption for Authentication and click Next.

8.In Accounts and Roles, type your MySQL Root Password twice. We recommend that you create also a dedicated database user account.

9.In Windows Service, keep the pre-selected values and click Next.

10. Click Execute and wait until MySQL Server installation completes. Click Finish, Next and Finish to close the installation window.

Configuration

1.Open the following file in a text editor:

C:\ProgramData\MySQL\MySQL Server 8.0\my.ini

2.Find and edit or append the following configuration into the [mysqld] section of the my.ini file:

max_allowed_packet=33M

For MySQL 8 you have to set the following variable:

olog_bin_trust_function_creators=1

oAlternatively, you can disable binary logging: log_bin=0

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 supported later versions (including version 8):

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

3.Save and close the my.ini file.

4.Open the Command Prompt and enter the following commands to restart the MySQL server and apply the configuration (the process name depends on the MySQL version: 8.0 = mysql80 etc.):

net stop mysql80

net start mysql80

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

sc query mysql80