Skip to content
How can I change the mysql database name?
gabrielurgomez
OP

25 days ago

hey!

I would like to change the default name "railway" of the DB to a custom one, I work with multiple databases and it would be nice to distinguis then in my db client, thanks!

Solved

1 Reply

Railway
BOT

25 days ago

The database name comes from the MySQL service's variables (MYSQL_DATABASE, with MYSQLDATABASE and MYSQL_URL built for connecting), and our MySQL service runs the official mysql Docker image. You can modify the deployment following the image's Docker Hub instructions, which explain how that variable behaves on a database that already has data. The dashboard's Database tab reads whichever database MYSQLDATABASE (falling back to MYSQL_DATABASE) names.

Changing the template's variables, image or start command makes the database yours to manage, as noted on our MySQL page. Services that connect through those variables need to point at the new name after the change.


Status changed to Awaiting User Response Railway • 25 days ago


Railway
BOT

17 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 17 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...