Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL can't connect with my driver

 
Joey Lemmens
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
download Mysql driver jar file.Goto your project library and add that JAR file into your library.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic