The moose likes JDBC and Relational Databases and the fly likes Converting from Access 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 "Converting from Access to MySQL" Watch "Converting from Access to MySQL" New topic

Converting from Access to MySQL

Jason Kwok
Ranch Hand

Joined: Mar 31, 2005
Posts: 126

I've just converted my database from Access to MySQL because I'm running on Linux now.

My question is, are there any changes needed in the servlet code when making a connection to a MySQL database in comparison to an Access database?

Using Access, I would include this in my servlet to make a connection:

String url = "jdbcdbc:jTunesDB"; //jTunesDB is the database name.
Connection connection = DriverManager.getConnection(url,"","");

and previously in my Windows machine, I would go into ODBC setting in my control panel and set the path where the Access database was stored.

If anyone can help me with this, I would greatly appreciate it.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32802

That should still work. Note that with MySQL, you are not tied to the ODBC driver. See this article for details.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Converting from Access to MySQL
It's not a secret anymore!