How can I change the mysql database name?
gabrielurgomez
PROOP

39 minutes 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!

Awaiting User Response

1 Replies

Railway
BOT

38 minutes 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 • 38 minutes ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...