wrote a class to test the link MySQL:
// JDBC  URL
static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";  
static final String DB_URL = "jdbc:mysql://localhost:3306/dbx?useSSL=false";
 
static final String USER = "root";
static final String PASS = "123456";
 
public static void main(String[] args) {
    Connection conn = null;
    Statement stmt = null;
    
    //  JDBC 
    Class.forName("com.mysql.jdbc.Driver");
    // 
    System.out.println("...");
    conn = DriverManager.getConnection(DB_URL,USER,PASS);//
    ...
  }
 error content: 
 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server 
ask the great god to pass by and take a peek at what the problem is
