Possible JDBC installation or usage problem in OS X



Hello there,

I'm having a terrible time trying to use the JDBC in os x.

What I want to do is use a program written in java and executed on my
mac to connect to a database on my website and INSERT a huge amount of
data. I have to do this as the upload limit on the web hosting is 2MB
and I've got a GB of data...

So, I've downloaded and extracted the jdbc mysql driver:
mysql-connector-java-3.1.14

Then I've opened my etc/profile file and added the location to the
classpath like this:

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/mysql-connector-java-3.1.14/mysql-connector-java-3.1.14-bin.jar"
export PATH - This might be the problem but I couldn't find an
explicit example of how to do this...

Then I connect to the DB like this:

....
Class.forName("com.mysql.jdbc.Driver");
} catch (Exception ex) {
// handle the error
}

String conStr = "jdbc:mysql://http://mywebsite.net/myDatabase";;

try {
Connection conn = DriverManager.getConnection(conStr, "user", "pass");
System.out.println("connected");
}
....


The result is always this:

SQLException: No suitable driver
SQLState: 08001
VendorError: 0

I'm a long way from being an expert so this is totally baffling me. Any
help would be great.

All the best
B

.



Relevant Pages

  • Stuff the purple heart programmers cook up
    ... C To act like a framework for the JDBC driver developers. ... D To hide the specifics of accessing particular kinds of database ... Topic: Java 2: Survey Author: Chris Mc Devitt ... The JDBC ResultSet is actually an interface java.sql.ResultSet. ...
    (comp.lang.java.programmer)
  • ClassNotFoundException
    ... Java application, using JDBC. ... My Java app is on Windows XP Home; ... Informix Client-SDK 2.81 TC3 is installed on XP; ... Using Informix Client-SDK dbping, every connection are made successfully, ...
    (comp.lang.java)
  • Re: ClassNotFoundException
    ... > Java application, using JDBC. ... > 3) My Java app is on Windows XP Home; ... > driver installed and a CLASSPATH set before running DBPING" ... > c) I know CLASSPATH system variable isn't set. ...
    (comp.lang.java)
  • Re: How to modify a MySQL database...
    ... and then update them with Java. ... To learn how to create a MySQL database, ... you will need to learn JDBC. ...
    (comp.lang.java.programmer)
  • Re: Microsoft Access DB Driver for JDBC
    ... The jdbc odbc bridge works but ... >> There is no JDBC driver for Access. ... > poster says it works) to allow Java apps to talk to any ODBC datasource. ...
    (comp.lang.java.programmer)