Pointers and Data
1. MySQL drivers
If you still can't connect to MySQL, the following is a pointer
to the latest driver.
Mysql JDBC Driver
Note that this is an archive. After you download it,
you need to unpack the archive by running
jar -xvf mm.mysql-2.0.13-you-must-unjar-me.jar
This will create a new directory named mm.mysql.jdbc-1-2c.
The README file in that directory should be helpful in getting
everything running.
2. Creating a house database.
By creating an appropriate data file, I have used the
MakeDB program from Chapter 4 of the Corejava book
to create an initial House database. Every thing you need
(besides the driver above and MySQL)
should be in this zip file.
Look in the MakeDB directory to
find the java program and the Houses.dat file. The MakeDB.properties
file has been adapted for MySQL, running on the local host, with an initial DB
named 'test', and a privileged user also named test. You may want to change
this to fit your DB configuration. You may also wish to adapt
the program and/or data file to meet your needs.
There is no requirement to use this
data file, but it is there if you need it.
To run, just compile with
javac MakeDB.java
and then run as follows
java MakeDB Houses
The zip file also contains a jpeg directory with pictures of the houses.
Tom