forked from gii-is-DP2/spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-organise mysql scripts so the app runs without root access
It works better that way with test containers and in k8s.
- Loading branch information
Showing
5 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# database init, supports mysql too | ||
database=mysql | ||
spring.datasource.url=jdbc:mysql://localhost/petclinic | ||
spring.datasource.username=root | ||
spring.datasource.username=petclinic | ||
spring.datasource.password=petclinic | ||
# SQL is written to be idempotent so this is safe | ||
spring.datasource.initialization-mode=always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE DATABASE IF NOT EXISTS petclinic; | ||
|
||
ALTER DATABASE petclinic | ||
DEFAULT CHARACTER SET utf8 | ||
DEFAULT COLLATE utf8_general_ci; | ||
|
||
GRANT ALL PRIVILEGES ON petclinic.* TO 'petclinic@%' IDENTIFIED BY 'petclinic'; |