File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Changing from MSAccess to MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Changing from MSAccess to MySQL" Watch "Changing from MSAccess to MySQL" New topic

Changing from MSAccess to MySQL

basappa jodalli

Joined: Mar 30, 2004
Posts: 3
i am currently using MSAccess as database for a Web application using JSP.
i would like to change to MySQL.
anybody pls let me know
what version of MySQL to be used?
how to connect to MySQL?
how to create tables in MySQL?
how to carry out primitive operations like insert,delete,select,update etc from frontend like JSP with MySQL as database.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

Nothing to do with JSP per se, so I'm moving this off to the JDBC forum.
[ March 30, 2004: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
Pawan Ramchandani
Ranch Hand

Joined: Aug 15, 2003
Posts: 78
you can work on mysql 4.0 and can download it from
all the functionality is the same you will find change in the data type
and to connect from jsp download driver class and use follwing string to fet connect with database.


Pawan Ramchandani<br />*******************************<br />SCJP 1.4<br />SCWCD <br />*******************************<br />Everything is okay in the end. If it's not okay, then it's not the end.
basappa jodalli

Joined: Mar 30, 2004
Posts: 3
Thanx a lot
i got MySQL
but i don't know how to make ODBC connection for MySQL
i m doing a project on it.
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399
You don't use ODBC to connect to MySQL. You use a type-4 (native) driver that you can download from: MySQL JDBC driver. Extract the ZIP file and you should have a jar file named "mysql-connector-java-3.0.11-stable.bin.jar". Make sure that the jar file is in your class path.
The driver class is: "com.mysql.jdbc.Driver".
The URL is: "jdbc:mysql://host-name/database-name". "host-name" is the DNS name or IP-address of the database (or "localhost" if it's running on the same machine). The "database-name" is optional, and refers to the database you are connecting to. You can pass in the user and password on the URL or as separate parameters, and there are lots of other parameters you can use. Check out the mysql documentation for more details.
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
Also keep in mind that MySQL listens to port 3306 by default. I am not sure is this can be changed, I guess you can check the documentation.
But anyway the URL of the connection string would be something similar to:

I hope this helps.
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399
You only need to specify the port if you have changed the default (3306), which is why I left it off in my previous post. So these are equivalent:
unless you've configured MySQL differently, in which case you'd have to specify the port.
I agree. Here's the link:
subject: Changing from MSAccess to MySQL
It's not a secret anymore!