Wednesday, August 10, 2011

Java Mysql sample program

Not the best deign of GUI or Database but it shows how Mysql can be connected with java.
Please get the mysql-connector-java-5.1.17 and the sql file used here
The links the documents show are the same
Import the sql file downloaded from the link to the mysql server
in CMD
write: mysqldump -u [uname] -p StudentDb > [backupfile.sql]

sample: mysqldump -u root -p StudentDb > F:\INtrodb\Student_data.sql
Then Enter the password of your mysql server



Make sure that the source code is connected to the library downloaded from the mysql java connector so the application will work with mysql properly.

The LogIn class


The CoursePane class


The StudentPane class


The Main class is Obj.java


The Application looks like the images in the pdf below. You can download the pdf from the File Menu.


No comments:

Post a Comment