Possible JDBC installation or usage problem in OS X
- From: "barry_normal" <barry_normal@xxxxxxxxxxx>
- Date: 20 Dec 2006 02:03:43 -0800
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
.
- Follow-Ups:
- Re: Possible JDBC installation or usage problem in OS X
- From: Ian Wilson
- Re: Possible JDBC installation or usage problem in OS X
- Prev by Date: Re: ODBC Connection
- Next by Date: Re: Possible JDBC installation or usage problem in OS X
- Previous by thread: How to detect existing text tables in a hsql db?
- Next by thread: Re: Possible JDBC installation or usage problem in OS X
- Index(es):
Relevant Pages
|