Steps to use my Mysql
- Add below lines in pom.xml org.springframework.boot spring-boot-starter-data-jpa mysql mysql-connector-java 8.0.12
- Add below lines in application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/santadb?autoReconnect=true&allowPublicKeyRetrieval=true&useSSL=false spring.datasource.username=admin spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.initialization-mode=always
spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect spring.jpa.hibernate.ddl-auto=update
3.To view data after insertion docker exec -it secretsanta-generator-db-1 mysql -u root -p USE santadb; SHOW TABLES; SELECT * FROM your_table_name;