Project Antville
Saturday, 17. May 2003
How to use AntClick with an external database
Switching AntClick from using the internal database to an external one (either MySQL or Oracle) is fairly easy if you do not have to transport data from the internal database to the external one (if you do it will be a more complex thing). Antville was tested with both MySQL and Oracle and comes with the necessary scripts to create the database in each of the two. If you plan to use a different one you will have to modify these on your own. This HowTo uses MySQL as example, however the procedure is always the same (just make sure that you use the right sql script).

Two remarks at the beginning: first we expect you to have a fairly good knowledge about the database you plan to switch to (this document won't tell you how to set up an external database or how to import data into it), and second: backup the whole AntClick directory.
  1. Have a working installation of MySQL
  2. Make sure you have the MySQL JDBC driver installed. You can download the latest version from the MySQL web site. Place the driver .jar file into the lib/ext folder of your AntClick installation.
  3. Create the database for Antville by importing the script antville_mysql.sql. The script is contained in the archive db_support.zip which itself is located in the directory apps/antville of your AntClick installation. Extract the files antville_mysql.sql and db.properties.mysql from the archive and place them somewhere on your harddisk. Open the sql script in your favorite text editor and scroll down to the line that starts with GRANT .... This line ends with IDENTIFIED by 'antville'. Replace the default password 'antville' with a more secure one. Save the script and open a command shell. Then run the script by typing
    mysql -u root -p < /path/to/antville_mysql.sql
    in the shell (you'll be prompted for the root's password). Alternatively you can log in to your MySQL database (as 'root') and type in the following:
    @source <path to the script>antville_mysql.sql
  4. Make sure that AntClick is stopped.
  5. Make sure you have an up-to-date Backup of the whole AntClick directory.
  6. Go to the subdirectory apps/antville of your AntClick installation. Rename the file db.properties to db.properties.mckoi and move the file db.properties.mysql that you extracted from the archive before into this directory. Rename db.properties.mysql to db.properties. Open this file in a text editor and adapt it to your setup (most likely you will only have to change the password, but this depends on how you set up your MySQL database).
  7. That should be it. Start AntClick up again and see if everything worked fine, you should have a clean installation now without any contents in it. If you receive any errors please check the steps above again (make sure you didn't forget to place the latest stable JDBC driver in lib/ext). If Antville is complaining about Is there a MySQL server running on this machine or similar check that the database user of Antville actually has the right to access the database.
Transferring data from McKoi to MySQL is a bit trickier, however Hannes provided a simple Antville DB export script that should do the trick.

Online for 2819 days
Last update: 2007-09-25 11:46
menu
recent updates
Release Plan
The roadmap below is obsolete. A newly compiled roadmap...
by robert (2007-09-25 11:46)
The Apache License, Version...
Copyright 2001-2007 by The Antville People Licensed...
by robert (2007-09-25 11:43)
New development site
I am currently in the process of moving all source...
by tobi (2007-09-25 11:27)
Features of Antville
The list below is obsolete. A newly compiled list...
by robert (2007-06-10 15:32)
Project Members
The list below is obsolete. A newly compiled list...
by robert (2007-06-10 15:31)

xml version of this page

made with antville