Request to rotate MySQL root password safely
leolemesvendas-stack
FREEOP

7 days ago

Hello Railway Support,

I need help rotating the root password for my Railway MySQL service safely.

Context:

My MySQL public connection string was accidentally exposed in a screenshot/chat, including the root password.

Project: resilient-education

Environment: production

Service: MySQL

Important:

My application service is no longer using the root user. I already created a dedicated MySQL user for the app and updated the app DATABASE_URL to use that dedicated user.

I do not want to manually change the root password inside MySQL because I understand this could break Railway-managed variables such as MYSQL_URL, MYSQL_PUBLIC_URL and MYSQL_ROOT_PASSWORD, or affect Railway’s internal management of the database.

Please rotate the MySQL root password from Railway’s side so that:

1. the old exposed root password becomes invalid;

2. MYSQL_URL, MYSQL_PUBLIC_URL and MYSQL_ROOT_PASSWORD are updated correctly;

3. the MySQL service remains healthy;

4. no data is lost.

Please confirm once the rotation is completed or let me know the safest Railway-supported way to do this.

Thank you.

Solved

1 Replies

Railway
BOT

7 days ago

You can rotate the root password yourself using the Credentials tab in your MySQL service's Database panel - it safely regenerates the password and updates all related environment variables (like MYSQL_URL, MYSQL_PUBLIC_URL, and MYSQL_ROOT_PASSWORD) in sync, so nothing breaks. After regenerating, manually redeploy any service that references those variables. See the Database View docs for details.


Status changed to Awaiting User Response Railway 7 days ago


Railway
BOT

3 hours 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 about 3 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...