Skip to content
Dan Cornell edited this page Apr 16, 2014 · 30 revisions

Describes switching the ThreadFix database to MySQL

Introduction

These instructions apply to versions 1.2 and 2.0 of ThreadFix only. They are likely to change in later releases.

To switch ThreadFix to use MySQL instead of HSQL, you'll need to have a couple things ready:

Once you have these things, you can start with the instructions in the next section.

These instructions refer to the ThreadFix 2.0 zip package, although they should be easy to adapt for other environments.

ThreadFix Configuration

First, if ThreadFix doesn't have a folder in tomcat/webapps, unzip the threadfix.war file to a folder named threadfix. Starting the server will unzip the WAR automatically.

  • Go to tomcat/webapps/threadfix/WEB-INF/classes.
  • Delete the file jdbc.properties.
  • Rename jdbc.properties.mysql to jdbc.properties.
  • Edit lines 15 and 16 or jdbc.properties to reflect your username and password.
  • If your MySQL instance is on another machine, you will need to edit line 14 and replace localhost with the name of the other machine.

Now everything is done on the ThreadFix side. We still need to import data into MySQL.

ThreadFix Configuration

Create the Tables

If the ThreadFix MySQL user does not have permissions to create databases (it is not recommended to run as root, for example) create a database named threadfix in MySQL.

At this point, start ThreadFix and verify that it starts. This will create tables in MySQL if done correctly. You can verify that tables have been created by entering the MySQL shell and executing the commands

use threadfix;
show tables;

Number of results depend on version.

  • 68 results (version 2.0)
  • 61 results (version 1.1)
  • 57 results (version 1.0.x)

All the tables will be empty at this point.

Import Mapping Data

Once these tables exist, let's import the ThreadFix mapping data. From inside the MySQL shell, execute:

source ${ThreadFix_Package_Base}\tomcat\webapps\threadfix\WEB-INF\classes\import.sql

If you're interested in another topic, here are some links:

Clone this wiki locally