Unable to Connect to MySQL Database

This is my application.properties file

server.port=${PORT:8080}
logging.level.org.atmosphere = warn
spring.mustache.check-template-location = false

# Launch the default browser when starting the application in development mode
vaadin.launch-browser=true
# To improve the performance during development.
# For more information https://vaadin.com/docs/flow/spring/tutorial-spring-configuration.html#special-configuration-parameters
vaadin.whitelisted-packages = com.vaadin,org.vaadin,dev.hilla,com.example.application
spring.jpa.defer-datasource-initialization = true
spring.sql.init.mode = always

# Database
# MySQL Configuration
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/
spring.datasource.username=root
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

^ This is probably why I’m getting an error message

I’m not sure how to resolve this

pom.xml file for reference:
dCevBG7As.txt (7.56 KB)

Could you try this for mysql depdency in your pom.xml?

com.mysql mysql-connector-j 8.0.33

Yep, but it now shows this error message

  1. What IDE is this? 2. Can you run maven from the command line?

This is intellij idea

  1. idk how to

try below:

<!-- MySQL JDBC --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.28</version> </dependency>

config:

database.user.driverClassName=com.mysql.cj.jdbc.Driver database.user.url=jdbc:mysql://rds.amazonaws.com:3306/my_db_name?useSSL=false&allowPublicKeyRetrieval=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useUnicode=yes&characterEncoding=UTF-8 database.user.username=root database.user.password=12345

Welcome to IntelliJ hell. I had the same issues with other maven libs.
Move the dependency as last dependency , then maven clean , then maven verify. Then cross your fingers, then say your prayer :palms_up_together:, and press start.

alright

The reason is usually corrupt maven import, ( no end zip file etc),

how do I maven clean and maven verify?

ty I think it fixed it

application isn’t running though, probably bc of some other issue