Java
  Home arrow Java arrow Page 2 - Installing MySQL With MySQLGraphic
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Installing MySQL With MySQLGraphic
By: Peter Lavin
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 7
    2003-06-23

    Table of Contents:
  • Installing MySQL With MySQLGraphic
  • Configuring MySQL Java
  • Installing MySQLGraphic
  • Downloading and Installing the Demo Database
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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. 

    More Java Articles
    More By Peter Lavin


     

    JAVA ARTICLES

    - 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 ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway