Configuring STS's Database

Hypersonic SQL Configuration

STS uses a relational SQL database to store its data.   Prior to running STS for the first time, the database must be configured.   Currently STS can be configured to use one of two databases, Hypersonic SQL or MySQL.   The STS installation includes everything needed to use Hypersonic SQL, making it the easiest to configure.   Simply select "Hypersonic SQL" in the Setup dialog and click OK.

The version of Hypersonic (HSQLDB) shipped with STS is 1.8.0.  As a result, users of Star Office 8 or Open Office 2.0 should be able to access STS data directly from within applications in these productivity suites.

MySQL Configuration

Some users may choose to configure STS to use MySQL.   With the MySQL ODBC driver, applications such as Word, Excel, Outlook, etc., can access the STS data directly.   A plethora of third party database managers and reporting tools are available that integrate nicely with MySQL.   The main disadvantage to using MySQL is that it must be downloaded, installed, and configured separately.

Quick steps

  • Select "MySQL" in the Starboard Tack Scoring's Setup dialog (and click OK).

  • Download and install MySQL server version 4.0 or later.

  • Start the MySQL server.

  • Open a Command Prompt window.

  • Put the MySQL client tools in the %PATH%, if necessary.

  • Create a database called "sts", a user called "sts", and with password "sts".  The commands for doing this are given here and are also in the Starboard Tack Scoring\bin\mysql_create_sts.bat file.

    
    mysqladmin -u root create sts
    echo "GRANT ALL PRIVILEGES ON sts.* TO 'sts'@'localhost' IDENTIFIED BY 'sts' WITH GRANT OPTION;" | mysql -u root mysql
    
                    
    I've also found the following commands to be useful. The first grants access from a specific machine, the second from all machines.
    
    echo "GRANT ALL PRIVILEGES ON sts.* TO 'sts'@'host[.domain]' IDENTIFIED BY 'sts' WITH GRANT OPTION;" | mysql -u root mysql
    echo "GRANT ALL PRIVILEGES ON sts.* TO 'sts'@'%' IDENTIFIED BY 'sts' WITH GRANT OPTION;" | mysql -u root mysql
    
    
    Feel free to change the database name or user name and passwords, above.   If you do, the connection parameters used by STS to connect to the database must also be changed. These are stored in the MySQL section of <STS_HOME>/config/hibernate.properties.

    NOTE: <STS_HOME> denotes the STS installation location, usually "C:\Program Files\Starboard Tack Scoring".

  • Populate the "sts" database with the schema using the following command:

    type <STS_HOME>\sql\sts-mysql.sql | mysql -u root sts
                  

  • STS is now configured to use MySQL.