MySql is an excellent relational database server available free of charge (in most instances, read the license) from T.c.X DataKonsultAB at http://www.mysql.com. Here at Central Connecticut State University's CS Department, we have a copy running on a Linux machine for student use in upper level courses. This page describes how to obtain tutorial information about MySql, and how to access our server through Java.
You are unlikely to need a copy of the MySql server, but if you do, you can download it from http://www.mysql.com. MySql also comes on a CD with, among others, RedHat and Mandrake Linux. If you do Windows (pun intended) you need to know that you have to pay for the Win 95 - 98 - NT version. (For Linux, UNIX, OS2, etc., MySql is generally free.)
Obtaining a Java (JDBC) Driver for MySql.
You will need client software for MySql. An excellent Java (JDBC) driver for accessing MySql through Java is available at no charge from M. Mathew at http://www.worldserver.com/mm.mysql/. Tutorial information about how to install and use the driver is also available there.
Though you are unlikely to need them, there are free Win 95 -98 - NT MySql clients and ODBC drivers (for accessing MySql servers through Microsoft Access) available from the MySql website.
Accessing the MySql Server through Java.
First, you download and install the mm JDBC driver (see above). Then you write Java programs to invoke the JDBC (Java Database Connectivity) API. Example programs from M. Mathew's tutorial documentation (see above), modified for use at Central, are available from our Java JDBC Demos page.
Obtaining SQL Information.
SQL (Structured Query Language) is a relational database query language invented by IBM and used almost universally for issuing queries to relational databases, including most non-IBM databases, and including MySql. When you access a MySql server through Java and the JDBC API, you will embed SQL statements in Java code. So to use MySql and access it through Java, you HAVE TO LEARN a bit of SQL.
There is an excellent tutorial in hypertext format available in the reference manual in the documentation section of the MySql website. You need to scroll way down the reference manual table of contents page to item 9 to reach the tutorial. The tutorial explains how to use the mysql client program on a MySql server machine, and you will want to ignore most of the mysql client stuff, but it (the tutorial) is also very good at explaining SQL.
Return to Dr. Charles W. Neville's Home Page.