package com.exmaven2;
import java.sql.*;
public class MainApp
{
public static void main(String[] args)
{
String url = "jdbc:mysql://localhost:3306/baseune";
String userName = "utilisateur1";
String password = "password";
try {
java.sql.Connection con = DriverManager.getConnection(url, userName, password);
} catch (SQLException e) {
e.printStackTrace();
}
}
}
Hello, I'm actually trying to connect to MySQL with a Maven project build in Eclipse IDE. I wrote this code that should let me connect to my server but I'm getting the error described in the title. I just began learning about databases and MySQL so I don't really know what to do. I already checked the privileges for 'utilisateur1' (somebody else posted the same question but this answer didn't work for me) and i have them all so I don't understand why it doesn't work.