Reputation: 522
I'm trying to connect to the mysql database, but to no avail. I put the dependencies of mysql and spring boot start jdbc and jpa.
I added the following lines to aplciation.properties.
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/springone
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
I'm using the xampp and the door is 3306.
When I run the project, a lot appears on the console. I took a print from the end.
I'm using the visual studio code editor
Upvotes: 1
Views: 665
Reputation: 2506
Try
spring.datasource.url=jdbc:mysql://localhost:3306/springone?serverTimezone=UTC
instead of
spring.datasource.url=jdbc:mysql://localhost:3306/springone
Upvotes: 1