Rails app with MySQL

Hey, I'm trying to deploy my first rails application using Railway and so far it is going good. Although, I have my schema to create a database and can't find a way to connect it to the database that I've create on Railway... So my question is: how to connect a rails schema to a Railway database?
13 Replies
Percy
Percy2y ago
Project ID: 2642dbc2-e614-4e2b-b91d-4273150a6576
miracle
miracleOP2y ago
2642dbc2-e614-4e2b-b91d-4273150a6576
Brody
Brody2y ago
show me a screenshot of your railway project please
miracle
miracleOP2y ago
Brody
Brody2y ago
add a variable reference
miracle
miracleOP2y ago
to each one of the MySQL variables?
Brody
Brody2y ago
yes
miracle
miracleOP2y ago
done
Brody
Brody2y ago
okay now you can use those environment variables in your code to connect to the database
miracle
miracleOP2y ago
but it will connect to the empty database that I have on railway, right?
Brody
Brody2y ago
well yeah thats how all databases start out lol
miracle
miracleOP2y ago
yeah, I mean that I have a schema with the tables, I want to put it on the mySQL one that is on Railway
Brody
Brody2y ago
then do it? i dont understand the problem its just a regular mysql database
Want results from more Discord servers?
Add your server