try{
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/fs";
String username = "root";
String password = "";
Connection conn = DriverManager.getConnection(url,username,password);
if(conn != null)
{
out.print("yes");
conn.close();
}
else
{
out.print("no");
}
}catch(ClassNotFoundException ex){
ex.printStackTrace();
}catch(SQLException ex)
{
ex.printStackTrace();
}
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/fs";
String username = "root";
String password = "";
Connection conn = DriverManager.getConnection(url,username,password);
if(conn != null)
{
out.print("yes");
conn.close();
}
else
{
out.print("no");
}
}catch(ClassNotFoundException ex){
ex.printStackTrace();
}catch(SQLException ex)
{
ex.printStackTrace();
}