wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes JDBC mysql connection error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC mysql connection error" Watch "JDBC mysql connection error" New topic

JDBC mysql connection error

michael wilson

Joined: Jun 05, 2001
Posts: 1
Hey all,
I am having terrible errors. I have the mm.blah.blah driver installed/configured correctly. My db seems to be working correctly. When i execute a testJdbcConnection, I receive the following error:
java.sql.SQLException: General Error: 79
at org.gjt.mm.mysql.Connection.<init>(Connection.java)
at org.gjt.mm.mysql.Driver.connect(Driver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at JdbcTest.main(JdbcTest.java:53)

and am becoming quite frustrated. The server is running with the right root password. when I do a ps -A |grep mysqld, the server shows up as running. Please advise. Thanks.
And here is the connection code segment used. I have all of the imports for the mm.blah and java.mysql.

String urlPath ="jdbc:mysql://localhost:3306/mysql";
Connection conn = (Connection) DriverManager.getConnection(strUrl,"user","passwd");
That's it. I cast the DriverManager.getConnection as a Connection as the mm.blah Connection is not the same as the java.mysql.Connection...atleast according to my compiler.
Thanks again in advance.
[This message has been edited by michael wilson (edited June 06, 2001).]
kichu kichu
Ranch Hand

Joined: May 10, 2001
Posts: 59
hai michael,
can u please post the code that u have written for database connectivity(in java i presume).
Samuel Chan

Joined: Jun 10, 2001
Posts: 20
for mm mysql driver, you need to change your url to
Conn = DriverManager.getConnection(
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 141
There is a support list for java programmers who use mysql. You can get on this list if you mail
I agree. Here's the link: http://aspose.com/file-tools
subject: JDBC mysql connection error
It's not a secret anymore!