rhakdnj / kopring

0 stars 0 forks source link

mysql #27

Open rhakdnj opened 7 months ago

rhakdnj commented 7 months ago
docker run --detach --env MYSQL_ROOT_PASSWORD=dummypassword \
--env MYSQL_USER=social-media-user --env MYSQL_PASSWORD=dummypassword \
--env MYSQL_DATABASE=social-media-database \
--name mysql \
--publish 3306:3306 \
mysql:8-oracle


application.yaml

#spring.datasource.url: jdbc:h2:mem:testdb
spring.jpa.show-sql: true
spring.datasource.url: jdbc:mysql://localhost:3306/social-media-database
spring.datasource.username: social-media-user
spring.datasource.password: dummypassword
spring.jpa.hibernate.ddl-auto: update
spring.jpa.properties.hibernate.dialect: org.hibernate.dialect.MySQLDialect