Hi,, due to some issues i uninstalled openjdk shipped default on my opensuse 11.3 and installed jdk 1_6_21 from a .bin file. Its installed to usr/java/jdk...... ..

The mysql connector is also present in the same but running a java program that connects to mysql gives me the error


java.sql.SQLException: Unknown initial character set index '192' received from server. Initial client character set can be forced via the 'characterEncoding' property.


the code i tried is

import java.sql.*;
import java.io.*;

class mysql_conn_tester
{
static Connection my_test_connection;
public static void main(String args[])
{
try
{
Class.forName("com.mysql.jdbc.Driver");
my_test_connection=DriverManager.getConnection("jdbc:mysql://localhost/test","root","");
if(my_test_connection==null)
System.out.println("Connection Failed\n");
else
System.out.println("Connection Success\n");
}
catch(Exception e)
{
System.out.println("FAILED\n"+e);
}
}
}

NB: This code has been working successfully and have tested connections before.