File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC mysql connection error" Watch "JDBC mysql connection error" New topic
Author

JDBC mysql connection error

michael wilson
Greenhorn

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.
\mw
**********************************
And here is the connection code segment used. I have all of the imports for the mm.blah and java.mysql.

Class.forName("org.gjt.mm.mysql.Driver").newInstance();
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).
regards,
kichu.
Samuel Chan
Greenhorn

Joined: Jun 10, 2001
Posts: 20
for mm mysql driver, you need to change your url to
Conn = DriverManager.getConnection(
jdbc:mysql://{URL}/{DBname}?user={loginID}&password={password});
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
There is a support list for java programmers who use mysql. You can get on this list if you mail
java-subscribe@lists.mysql.com
frank
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC mysql connection error
 
Similar Threads
Exception while connecting to database
Error when getting a connection from DB2 DB
No suitable Driver in DB2
DB2 :No suitable driver
How do i know , on which port MS Sql Server is running?