As of December 31st, 2023 ThreadFix 2.X has reached End of Life and is no longer supported. For any further information please contact the Success and Implementation team.

Windows MySQL Installation and Configuration

You will learn

How to install and configure MySQL on Windows.

Prerequisites

Audience: IT Professional and/or End User
Difficulty: Intermediate
Time needed: Approximately 60 minutes
Tools required: MySQL 8

Installing MySQL

ThreadFix currently only supports MySQL 8.

  • Note

    You will be prompted to create a password for the 'root' user. Keep this password in a secure location.

  • Create threadfix MySQL accounts with DB Admin user role for both the % and localhost hosts.

    • More information on creating users and their permissions in MySQL can be found here.

  • Have MySQL run as a Windows Service and have it start at System Startup.

Options for Large Data sets

To help the MySQL server to work with large data sets, we recommend allocating more than the 8GB of memory stated in our hardware requirements for the DB server.

Additionally, edit the my.ini file, adding the following lines under the "[mysqld]' header (or editing the existing values, if already present):

innodb_buffer_pool_size=12G tmp_table_size=6G max_heap_table_size=6G max_allowed_packet=1G

Restart the MySQL server for the changes to take effect.

You can confirm the changes afterward with the following query (unit=GB):

select CONCAT(@@innodb_buffer_pool_size/POWER(1024,3),'G') AS INNODB_BUFFER_POOL_SIZE,CONCAT(@@tmp_table_size/POWER(1024,3),'G') AS TMP_TABLE_SIZE,CONCAT(@@max_heap_table_size/POWER(1024,3),'G') AS MAX_HEAP_TABLE_SIZE,CONCAT(@@max_allowed_packet/POWER(1024,3),'G') AS MAX_ALLOWED_PACKET;

 

Install MySQL Workbench (optional)

Download and install the latest MySQL Workbench here.

Disable Safe Updates Option

In order to run various update scripts using MySQL Workbench, the Safe Updates option needs to be disabled (it's enabled by default).

  • Click on the Edit menu and select Preferences.

  • Select SQL Editor on the left menu.

  • Scroll down to the Other section.

  • Uncheck the Safe Updates checkbox and click the OK button.

  • Close and restart MySQL Workbench after disabling this option.

Create Database

Update MySQL Character Set and Create the threadfix database:

  • MySQL does not, by default, support the full Unicode character set. ThreadFix requires the MySQL character set to be updated to utf8mb4. Running the following command will create the threadfix database and set the correct encoding:

    CREATE DATABASE threadfix CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

You can run the above command from a MySQL command-line prompt or from a query tab within MySQL Workbench.

If using MySQL Workbench, you can also create the threadfix database by right-clicking on an existing one under Schemas in the Navigator and selecting 'Create Schema...' then selecting the utf8mb4_unicode_ci collation, clicking the 'Apply' button at the bottom of the 'threadfix - Schema' tab and then again in the 'Apply SQL Script to Database' dialog, then the 'Finish' button.

ThreadFix Installation

Now that you've completed the Windows Enterprise Setup and MySQL Installation and Configuration, proceed to the ThreadFix Installation page.

 

www.threadfix.it | www.coalfire.com
Copyright © 2024 Coalfire. All rights reserved.

This Information Security Policy is CoalFire - Public: Distribution of this material is not limited.