Home arrow Java arrow Page 2 - Installing MySQL With MySQLGraphic
JAVA

Installing MySQL With MySQLGraphic


Sure, you've used PHPMyAdmin, but have you heard of MySQLGraphic? In this article Peter shows us what it is and what it can do for us...

Author Info:
By: Peter Lavin
Rating: 5 stars5 stars5 stars5 stars5 stars / 7
June 23, 2003
TABLE OF CONTENTS:
  1. · Installing MySQL With MySQLGraphic
  2. · Configuring MySQL Java
  3. · Installing MySQLGraphic
  4. · Downloading and Installing the Demo Database
  5. · Conclusion

print this article
SEARCH DEVARTICLES

Installing MySQL With MySQLGraphic - Configuring MySQL Java
(Page 2 of 5 )

Downloading MySQL

MySQL may be downloaded from the URL http://www.mysql.com/. Download the database server version 4 Windows binary. Currently you can get to the download page by choosing the Database server link from the home page. Scroll down the page and click on download the source code and optimised binaries. Scroll down this page and choose, MySQL 4.0 -- Production release (recommended).

Then find: 

Windows 95/98/NT/2000/XP/2003

 

4.0.13

18.1M

Download | Pick a mirror

Click on the download link. The file is about 18 megs in size so go make some coffee if you have a dial-up connection.

 

Installing MySQL


The database file is compressed and needs to be unzipped into a temporary directory. Do this and then run the setup.exe file. This should install mysql in the directory C:\mysql.When the installation is complete, you may get rid of the temporary directory and the zipped file.

 

Using Windows Explorer, find the directory c:\mysql\bin. Double-click the file winmysqladmin.exe. The first time you run this executable you will be prompted for a username and password. Enter something appropriate. You must start this file in order to connect to the MySQL server. Create a shortcut to it in the Start Menu and then you wonít have to think about it again.

 

For convenience sake, you should add the directory c:\mysql\bin to your path. This will allow you to issue the command mysql from any directory without having to type in the full path. This is done by adding the line PATH=%PATH%;C:\mysql\bin to your autoexec.bat file. Under Windows NT and 2000 you may also set an environment variable by right clicking the My Computer icon on the desktop and then choosing Properties. Under the Advanced tab there is an Environment Variables Option. Youíll be able to figure it out from there. Regardless of how you set the PATH variable, reboot your machine and test that your path has been changed by opening a DOS window and typing mysql.

 

The cursor should change to mysql>. Now type show databases; Donít forget the semi-colon. A window very similar to the following should appear:

 

 

You have successfully installed and connected to MySQL. To end your session type quit and press the enter key.

 

At this point anyone with access to your computer can open and change any database. If security is an issue please follow the documentation provided by MySQL. Securing your databases will not be dealt with here. In fact, it is assumed throughout this document that no user name or password is required to connect to MySQL.


Preparing to Install the Graphical Interface


The following two files are required:

 

MySQLGraphic1.2.5.jar and mysql-connector-java-3.0.8-stable-bin.jar

 

Acquiring these files will be dealt with in a moment. Right now, since both of these files are Java archive files and require Java in order to run, letís download Java. Throughout, Java is variously referred to as the Java Runtime Environment (JRE) or the Java Virtual Machine (JVM). Instructions for installing the current version follow.

 

Downloading and Installing the JRE


To run these archive files you should have the latest version (1.4) of Java on your computer. If you already have this version of Java installed on your system you may skip this step.

 

Download the Java Runtime Environment from the URL http://java.sun.com. Click the Standard edition link on this page. This will take you to http://java.sun.com/j2se/. On this page click the Java VM link on the left. Follow the instructions and Java should be installed fairly quickly as it is not a large file. At the date of writing this should install Java in the directory, C:\Program Files\Java\j2re1.4.0\. Confirm that this directory has been created and then weíll move on to installing the driver.

 

Downloading and Installing the Driver

 

The driver, MySQL Connector/J, is available from the MySQL site. Go to the URL http://www.mysql.com/products/connector-j/index.html and click on the link for downloading version 3.0. Find the link below and download.

 

Source and Binaries (zip)

 

3.0.8-stable

737.5K

Download | Pick a mirror

MD5: b786225f112e5b428d86eaf83e1de32b | Signature


Extract the downloaded file to a temporary directory and within this temporary directory open the folder, mysql-connector-java-3.0.8-stable. The folks at MySQL have kindly provided you with the source code for this driver but when you are starting out this can be rather confusing. The only file you really need is mysql-connector-java-3.0.8-stable-bin.jar within the current folder.


What you now must do is put this file, mysql-connector-java-3.0.8-stable-bin.jar, in the ext directory of the lib directory below the active Java runtime directory. Thatís a bit of a mouthful but if youíve just installed the Java Virtual Machine as described above it will be:

 

C:\Program Files\Java\j2re1.4.0\lib\ext

 

Move the driver to this location. 


blog comments powered by Disqus
JAVA ARTICLES

- Java Too Insecure, Says Microsoft Researcher
- Google Beats Oracle in Java Ruling
- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials