In this tutorial, you will learn how to deploy Spring Boot application together with it’s MySQL database to Heroku. Follow the steps provided.
Create an App in Heroku
Step 1 – Login in to Heroku (heroku.com) and create a new app.
Step 2 – Under the Deployment Method, choose GitHub as shown below:

Step 3 – Under the Resources section, find Heroku Postgres in the Add-ons section

Step 4 – The order form is displayed as shown below, and you have to submit it.

Step 5 – In the next page, select the dropdown next to Free and choose Create Dataclip
Step 6 – Click on Heroku Postgres. Then click on the Settings tab. Then click on View Credentials to display the PosgreSQL credentials as shown below:

Step 7 – You can now use these details to update your application.properties file
Step 8 – Open your User model (User.java) and add this @Table annotation to the class.
@Table(name = "\"User\"")
Step 9 – Push your changes to Github repository
Step 10 – Finally, go back to Heroku and follow the instruction to connect and deploy to Heroku