MySQL® is an excellent relational database server available free of charge (in most instances, read the license) from MySQL AB 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 and resource 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 MySQL Resources and Information.
There is an excellent short MySQL resource page at http://www.cwnresearch.com/resources/databases/mysql/, and there is an extensive list of tutorials, resources and available drivers at the MySQL AB website at http://www.mysql.com.
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://mmmysql.sourceforge.net/. 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 chapter 3 of the MySQL reference manual. 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.