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).
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 the 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 also create 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 in the [mysqld] section of the my.ini file:
•Create the [mysqld] section if it is not present in the file. •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 |
Parameter |
Comments and recommended values |
MySQL version |
---|---|---|
max_allowed_packet=33M |
|
All the supported versions. |
log_bin_trust_function_creators=1
|
Alternatively, you can disable the binary logging: log_bin=0 |
|
innodb_log_file_size=100M
|
The multiplication of values of these two parameters must be at least 200. The minimum value for innodb_log_files_in_group is 2 and maximum value is 100; the value also has to be integer. |
5.7 5.6.22 (and later 5.6.x) |
innodb_log_files_in_group=2 |
||
innodb_log_file_size=200M |
Set the value to at least 200M, but not more than 3000M. |
5.6.20 and 5.6.21 |
3.Save and close the my.ini file.
4.Open the Command Prompt and type 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.Type the following command in Command Prompt to check whether the MySQL server is running:
sc query mysql80