Ziptie with MySQL or PostgreSQL

Introduction
It is possible to replace derby database, ziptie’s original database, with MySQL or PostgreSQL. For me derby is enough to handle ziptie. Small resource, based on java and sql standard, easy backup (just copy the directory) and of course integrated with ziptie from beginning.But if you already have MySQL or PostgreSQL, it is good idea to integrate it to the existing database.

Quick Howto
Here are some steps to be done i can collect for you:

  1. MySQL as Ziptie Database
    • The supported version is 5.1+
    • Locate the dbutil.pl file, in my windows default installation it is in “C:\Program Files\ZipTie Server
    • Initialize Ziptie’s Database using “dbutil.pl –db=mysql reset
    • If you run dbutil.pl without paramater, it will print all available parameters/options
    • It is possible to use MySQL database in different server/ip address
    • It is possible to use non ‘root‘ user but we need to run the database and tables creation manually. If you open dbutil.pl, you will find this option is possible.
    • If you use different server or user or database name, don’t forget to change “osgi-config/bitronix-jta/btm-config.mysql.properties” file and “osgi-config/quartz/quartz.mysql.properties” file.
  2. PostgreSQL as Ziptie Database
    • The supported version is 8.2.5+
    • Most step to use PostgreSQL is the same as MySQL above
    • PostgreSQL configuration files to be checked are in “osgi-config/bitronix-jta/btm-config.pgsql.properties” file and “osgi-config/quartz/quartz.pgsql.properties” file.

Three other important things are:

  1. Make sure ziptie is using your preferred configuration, check “./osgi-config/database/db.properties“. It should contain “mysql” if you use mysql.
  2. Check ziptie server log files “ziptieServer.log“.
  3. Read Ziptie’s documentation

Download And Resources
1. Ziptie download 2. MySQL Website 3. PostgreSQL Website 4. Apache Derby Database Website

Leave a Reply