spring boot with mysql jpa example
Example 1: spring application properties mysql jpa
spring.datasource.url=jdbc:mysql://localhost:yourDatabase?serverTimezone=UTC
spring.datasource.username=${USERNAME}
spring.datasource.password=${PASSWORD}
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
spring.logging.level.org.hibernate.SQL=debug
spring.jpa.show-sql=true
Example 2: java mysql springboot jpa stackoverflow
1: Add database name to the schema
2: There is a Cone tower button with + sign to add schema
1: Add to "spring.datasource.url=jdbc:mysql://localhost:3306/{databasename}"
2: Add the following : ?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC