R
Railway13mo ago
shm-dsgn

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
No description
9 Replies
Percy
Percy13mo ago
Project ID: N/A
Fragly
Fragly13mo ago
n/a ^ write that or the thread will close
shm-dsgn
shm-dsgn13mo ago
n/a
Fragly
Fragly13mo ago
So if I understnad correctly, you wanna make an sql database on railway?
shm-dsgn
shm-dsgn13mo ago
yes i made one for trying out, but couldn't figure out how to connect it with the springboot stuff
Fragly
Fragly13mo ago
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
No description
Fragly
Fragly13mo ago
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
Fragly
Fragly13mo ago
No description
shm-dsgn
shm-dsgn13mo ago
ok ill try it out
Want results from more Discord servers?
Add your server