I run WAMP and have made the MySQL database but it cannot connect. Can anyone help me?
package databasetest;
import java.sql.*;
/**
*
* @author kon_f
*/
public class DataBaseTest {
private static final String USERNAME = "root";
private static final String PASSWORD = "";
private static final String CONN_STRING = "jdbc:mysql://localhost:3306/databasetest";
public static void main(String[] args) throws ClassNotFoundException {
Connection conn = null;
try{
conn = DriverManager.getConnection(CONN_STRING,USERNAME,PASSWORD);
System.out.println("Connected!");
}catch (SQLException e){
System.err.println(e);
}
}
}