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
Project ID:
2642dbc2-e614-4e2b-b91d-4273150a6576
2642dbc2-e614-4e2b-b91d-4273150a6576
show me a screenshot of your railway project please
add a variable reference
to each one of the MySQL variables?
yes
done
okay now you can use those environment variables in your code to connect to the database
but it will connect to the empty database that I have on railway, right?
well yeah thats how all databases start out lol
yeah, I mean that I have a schema with the tables, I want to put it on the mySQL one that is on Railway
then do it?
i dont understand the problem
its just a regular mysql database