SpringBoot with MySQL on railway setup
Hey I am learning SpringBoot and was working locally with a MySQL db set up(locally as well), and I thought of making one in the Railway and connect it up to the SpringBoot code that I wrote.
Anyone knows how to do that? Like I need to do stuff in the application.properties right? but cant figure out what to put in exactly. if anyone can help, appreciate it
9 Replies
Project ID:
N/A
n/a
^ write that or the thread will close
n/a
So if I understnad correctly, you wanna make an sql database on railway?
yes
i made one for trying out, but couldn't figure out how to connect it with the springboot stuff
then you'd want to create a Database on railaway
you can do so by right clicking on your project's page and clicking on database
and then selecting the db you wanna use
after that, you just use the env variables railway provides to connect to it from your project
you can read more about ^ here: https://docs.railway.app/develop/variables
ok ill try it out