нажмите на окно и выберите услуги

, затем нажмите на базы данных и выберите новое соединение

выберите нужный драйвер

затем нажмите Готово
если вы хотите проверить, успешно ли установлено соединение или нет
try
{
con=DriverManager.getConnection("jdbc:mysql://localhost/student_result","root","");
JOptionPane.showMessageDialog(null,"connected with "+con.toString());
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"not connect to server and message is"+e.getMessage());
}