|
hns,
April 17, 2003 at 4:04:16 PM CEST
Antville DB export script 0.0.1
So here's a simple Antville DB export script as promised yesterday. It lets you export existing Antville data from one database (say, the embedded Mckoi database in Antclick) to another (say, MySQL).
Here are the steps to take. I assume that you'll be migrating from Antclick/Mckoi to Mysql, but with a few changes it will work in any direction.
- Update your installation of Antville to Helma 1.2.4 by downloading helma.jar and saving it to the lib directory of your antville installation (make a backup copy of the old version before)
- Make sure you have a database driver for the new database you want to use. If it is MySQL, you can download the JDBC driver from the MySQL web site. Place the driver .jar file into the lib/ext folder of your installation.
- Set up MySQL and import antville_mysql.sql, which you should find zipped up inside apps/antville/db_support.zip. This can be done with
mysql -u root -p < /path/to/antville_mysql.sql
You should be prompted for the mysql root password. You might want to change the antville user password (IDENTIFIED BY 'antville') in the GRANT statement at the beginning of the file before performing this step!
- Open file apps/antville/db.properties in your favorite text editor and add the definition for the new database with the name antville-new:
# Properties of antville datasource
antville.url=jdbc:mckoi:local://./db.conf
antville.driver=com.mckoi.JDBCDriver
antville.user=admin
antville.password=entwil
antville-new.url=jdbc:mysql://localhost/antville
antville-new.driver=org.gjt.mm.mysql.Driver
antville-new.user=antville
antville-new.password=antville
Note that you might need to change the last line (antville-new.password=xxx) if you changed the password in step 3. The jdbc:mysql: URL may also look slightly different depending on your setup.
- Download the following file and save it as apps/antville/root/export.hac
export
(application/octet-stream, 2 KB)
- Start up Antville, open your browser and point it to http://localhost:8080/export (with http://localhost:8080/ being the home page of your Antville installation). If you get a page with many yellow lines and no mention of the word "error", you're 90% done.
- Stop Antville and open file apps/antville/db.properties again. This time, you remove the original lines and change the lines you added in step 4 from "antville-new" to "antville":
antville.url=jdbc:mysql://localhost/antville
antville.driver=org.gjt.mm.mysql.Driver
antville.user=antville
antville.password=antville
The next time you start Antville, you should be running with your new database. If not, something went wrong. In any case, I'd be curious to hear.
link
(8 comments)
|
|
|
online for 8546 Days last updated: 1/4/11, 10:22 AM
Youre not logged in ... Login
zfuture's house here is zfuture's
house
by zfuture (7/31/03, 2:59 AM)
i understand your concerns however,
i hardly can think of a solution. certainly, if the...
by tobi (7/29/03, 9:47 AM)
Found several more similar sites
listed This is getting to be quite a concern to...
by cobalt123 (7/27/03, 7:56 PM)
Second Post Alert on Referrer
bug livecatz I put this into "help" and now here:...
by cobalt123 (7/26/03, 7:14 PM)
well it's not easy to
find from here, anyway. think we should include a link,...
by tobi (7/24/03, 11:25 AM)
So finally I found
the helma Bugzilla - stupid me.
by mdornseif (7/24/03, 10:28 AM)
clock not that it's particularly
earthshattering but the antclock is running slow by about 15...
by kohlehydrat (7/23/03, 8:25 PM)
but blogosphere.us isn't can't really
be rated as spam can it?
by kohlehydrat (7/23/03, 8:08 PM)
How to log skin names
I accessed to console?? Hi,
I would like to know...
by winson (7/23/03, 4:12 PM)
|