This week's giveaways are in the
MongoDB
and
Jobs Discussion
forums.
We're giving away four copies of
Mongo DB Applied Patterns
and 4 resume reviews from
Five Year Itch
and have the authors/reps on-line!
See
this thread
and
this one
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Mongo DB Applied Patterns
this week in the
MongoDB
forum
or a resume review from
Five Year Itch
in the
Jobs Discussion
forum!
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
bad handshake error
Dorj Galaa
Ranch Hand
Joined: May 29, 2001
Posts: 113
posted
Jul 24, 2001 02:49:00
0
import java.sql.*;
public class MySQL
{
public static void main(
String
args[])
{
try
{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection mysql=DriverManager.getConnection("jdbc:mysql://localhost:3306/ok","qqq","qqq");
System.out.println("Ok");
}
catch(
ClassNotFoundException
e)
{
System.out.println("Class Not Found");
}
catch(
SQLException
e)
{
System.out.println(e.getMessage());
}
catch(
InstantiationException
e)
{
System.out.println(e.getMessage());
}
catch(
IllegalAccessException
e)
{
System.out.println(e.getMessage());
}
}
}
Senior software engineer
I agree. Here's the link:
http://aspose.com/file-tools
subject: bad handshake error
Similar Threads
Connction faile please help me
how to connect MySql
Getting Connected
eclipse can not connect to mysql!!!
Newbie Java MySql question
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter