Access denied for user 'mk'@'localhost' to database 'neueschema'

I am trying to connect my SQL database into Java so my JAVA IDE could display some of the data in the SQL. I already created primary keys and other attributes for my tables, but I have not inserted any data into it yet.

Now I received the following error on my Java IDE. I am sure I have missed out some small codes in my editor. I hope any of you could point that out:

/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java -javaagent:/Applications/IntelliJ IDEA Edu IDEA Edu -Dfile.encoding=UTF-8 -classpath /Users/mamikawamura/IdeaProjects/Database/out/production/Database:/Users/mamikawamura/Desktop/mysql-connector-java-8.0.27/mysql-connector-java-8.0.27.jar Database
Datenbank wird verwendet...
Exception in thread "main" java.lang.IllegalStateException: Datenbank konnte nicht verwendet werden
	at Database.main(
Caused by: java.sql.SQLSyntaxErrorException: Access denied for user 'mk'@'localhost' to database 'neueschema'
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(
	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(
	at com.mysql.cj.jdbc.ConnectionImpl.<init>(
	at com.mysql.cj.jdbc.ConnectionImpl.getInstance(
	at com.mysql.cj.jdbc.NonRegisteringDriver.connect(
	at java.sql/java.sql.DriverManager.getConnection(
	at java.sql/java.sql.DriverManager.getConnection(
	at Database.main(

Process finished with exit code 1

For your reference, the source code is here:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Database {
    public static void main(String[] args) {
        String adresse = "jdbc:mysql://localhost:3306/neueschema";
        String nutzerName = "mk";
        String pwd = "morry329A";

        System.out.println("Datenbank wird verwendet...");

        try (Connection verbindung = DriverManager.getConnection(adresse, nutzerName, pwd)) {
            System.out.println("Datenbank verwendet!");
        }catch (SQLException exp){
            throw new IllegalStateException("Datenbank konnte nicht verwendet werden", exp);

I just resolved the problem myself with the help here

I modified String nutzerName = "mk"; to String nutzerName = "root";. It runs perfectly now. The problem was that I entered a wrong username “mk”. It was supposed to be the right one “root”