Issue
I am learning Spring boot by myself. Now I am using H2 database in my spring boot application.
How do I change H2 database to SQL database?
Is there any other application need to install for using SQL database?
Solution
No, you just need to add corresponding dependencies with the DB and then update the application.properties file with the new configuration of your desired DB.
Look at this to work with MySQL: https://mkyong.com/spring-boot/spring-boot-spring-data-jpa-mysql-example/
Or you may want to use different profiles with different DBs (eg: H2 & MySQL) See this: https://www.baeldung.com/spring-profiles
Answered By - Hung Nguyen Duy
Answer Checked By - Marie Seifert (JavaFixing Admin)