Copy this code and paste it in your HTML
import java.sql.*;
public class Connect
{
public static void main
(String[] args
) {
String url
= "jdbc:mysql://192.168.1.121/drupal?user=" + userName
+ "&password=" + password
; try
{
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
System.
out.
println ("Database connection established"); }
{
System.
err.
println ("Cannot connect to database server"); }
finally
{
if (conn != null)
{
try
{
conn.close ();
System.
out.
println ("Database connection terminated"); }
catch (Exception e
) { /* ignore close errors */ } }
}
}
}