This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes Connction faile please help me Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Connction faile please help me" Watch "Connction faile please help me" New topic
Author

Connction faile please help me

Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
I try connect to My SQL code is
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());
}
}
}
but have bad handshake error


Senior software engineer
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Connction faile please help me
 
Similar Threads
how to connect MySql
How to call a UNIX script froma java application on AIX (using Korn shell)?
eclipse can not connect to mysql!!!
bad handshake error
Newbie Java MySql question