[Solved] springboot Project Run Error: HikariPool-1 – Exception during pool initialization.

Let’s take a look at the screenshot of the error report first:
he said that an exception occurred during the initialization of hikaripool-1-pool, which led to the failure of project startup

reason: JDBC connection failed

solution:

Step 1: check the application first After the URL in yaml is 3360/(database name), check whether there is this name in your database
Step 2: check whether the username and password are the same as when designing the database. Usually, we use root and 123456 when designing. Because when you import a new project, these things are easy to forget to change and report errors. So check whether the address, port and database name are the same as your own

in addition, if you are using springboot 2.0 or above

Should be configured as driver ‐ class ‐ Name: com.mysql.cj.jdbc.Driver

 datasource:
    #                              //PATH     PORT   DATABASE_NAME
    url: jdbc:mysql://${MYSQL_HOST:localhost}:3306/studentmanagement
    username: root
    password: 123456
    driver-class-name: com.mysql.cj.jdbc.Driver

After we finish the modification, let’s check the operation again:

The project is running successfully

Read More: