my dog learned polymorphism*
The moose likes JDBC and the fly likes MySQL can't connect with my driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MySQL can Watch "MySQL can New topic
Author

MySQL can't connect with my driver

Joey Lemmens
Greenhorn

Joined: Jan 05, 2011
Posts: 2
At the moment I have a Netbeans project that works completely.
I've a local MySQL database. The connection with the database happens here.

SERVLET

DATAACCESS


In the web.xml file are the values for url, password, login and driver.

But now I want to publish it online. So I have an online MySQL database. My .war file is also online but they can't connect.
I think I need an ODBC DSN connection. And I can only choose from:

SQL Server
Microsoft Access Driver (*.mdb)
MySQL ODBC 3.51 Driver
Microsoft Excel Driver (*.xls)

I have tried using the MySQL ODBC 3.51 Driver but all the connection parameters I tried were wrong.

(I can change my MySQL database into a MS SQL database if this is easier.)

I hope someone can help me with this issue.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

So what's your question?

Are you asking what connection parameters you should use? That's impossible for anybody to say given the information you have posted. You're better off working with your hosting company if that's your question.
Joey Lemmens
Greenhorn

Joined: Jan 05, 2011
Posts: 2
Paul Clapham wrote:So what's your question?


Can I connect my MySQL database with the MySQL ODBC 3.51 Driver?
If yes, what are the connection parameters I should use?

Paul Clapham wrote:You're better off working with your hosting company if that's your question.


I have sent a request to my hosting company but they keep sending me ASP.net examples which are useless...
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Joey Lemmens wrote:Can I connect my MySQL database with the MySQL ODBC 3.51 Driver?
If yes, what are the connection parameters I should use?


Most likely yes. You should use the connection parameters which work with the driver as it's configured on your host. Which we know nothing about, as I tried to point out earlier. All we know is that it's ODBC so you should use the JDBC-ODBC bridge driver.

I have sent a request to my hosting company but they keep sending me ASP.net examples which are useless...


Really? Those examples don't contain any hints about connection configuration at all? (I can't comment on that because I haven't seen them.) Perhaps you should switch to a hosting company which provides better service.
abhishek rathur
Ranch Hand

Joined: Jan 14, 2010
Posts: 66
download Mysql driver jar file.Goto your project library and add that JAR file into your library.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MySQL can't connect with my driver
 
Similar Threads
Problem in connecting Oracle9i thru wsad5.0
MySql connection issue
websphere studio and mysql
MySQL drivers
Help with this code!