kusuma guntupalli wrote:

>Dear Sir,
>
>When Iam trying to connect remote mysql database Using
>JSP on LINUX Os it is giving an error...
>Remote system is Windows NT.
>
>java.sql.SQLException: Communication link failure: Bad
>handshake
>
>I loaded
>
>1).MySQL-3.23.40-1.i386.rpm
>2).MySQL-client-3.23.40-1.i386.rpm
>3).mm.mysql.jdbc-12b.tar driver
> files in to my system. Is any other files required to
>install?
> How i will overcome this problem . My OS is LINUX Red
>Hat.
>
>My JSP source code is like this:
>
>
><%@ page language="java" import="java.sql.*" %>
><%
>
>Connection Conn = null;
>ResultSet RS = null;
>Statement Stmt = null;
>String DBUrl = "jdbc:mysql://IPaddress:3306/db
>name?user=username&password=pass";
>Class.forName("org.gjt.mm.mysql.Driver").newInstance();
>
>Conn = DriverManager.getConnection(DBUrl);
>Stmt = Conn.createStatement();
>RS=Stmt.executeQuery("select * from HITS");
>
>while(RS.next())
>{
>%>
><br>
><%
>out.println(RS.getString(1));
>
>}
>%>
>
>
>__________________________________________________
>Do you Yahoo!?
>Faith Hill - Exclusive Performances, Videos & More
>http://faith.yahoo.com
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>  
>
This has been answered many times in the past few days on this list. Is 
there a programming class assignment out there somewhere that people are 
using? The question is always the same, from different people.

You are using a _very_ old version of MM.MySQL to connect to a newer 
version of MySQL. They don't work together, because the network protocol 
changed slightly.

What you need to do is download a newer version of MM.MySQL (which is 
now MySQL Connector/J) from http://www.mysql.com/products/connector-j/

    -Mark

-- 
For technical support contracts, visit https://order.mysql.com/?ref=mmma

    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
        <___/ www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to