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