Skip to content
MySQL Database View fails via SSH with Access denied for [email protected], but MySQL connections work
flavioathaide
OP

a month ago

Hello Railway team,

I’m having an issue with the Railway MySQL Database View.

The Database View shows:

“Deployment Online” ✅

“Required Variables” ✅

“Database Connection” ❌

Error:

Access denied for user 'root'@'127.0.0.1' (using password: YES)

However, the MySQL database itself is fully functional.

I verified the following:

  • The MySQL service is online.

  • The backend application connects successfully to MySQL.

  • The frontend is working normally.

  • DBeaver connects successfully using the current Railway credentials.

  • From the MySQL service Console, I can connect with:

    mysql -uroot -p

  • From the same Console, I can also connect via TCP using:

    mysql -h 127.0.0.1 -uroot -p

  • Both connections succeed using the same current password.

  • SELECT USER(), CURRENT_USER(), DATABASE(); via the local socket returns:

    root@localhost, root@localhost, and NULL.

  • The MySQL accounts are:

    root@%

    root@localhost

    both using caching_sha2_password.

  • After selecting the railway database, SHOW TABLES; successfully returns all 8 tables:

    clientes

    compras

    encomendas

    fornecedores

    pagamentos

    produtos_interesse

    tentativas_login

    usuarios

  • I have already regenerated the Railway database password once and updated the dependent backend connection. The application and DBeaver are currently working.

  • I do NOT want to regenerate the password again or modify/delete the MySQL users or volume because the production application is currently working.

The important point is that the exact connection that the Database View appears to be failing with ([email protected]) works successfully when tested manually from the MySQL service Console.

Therefore, the issue appears to be specific to the Railway Database View / SSH connection mechanism rather than MySQL authentication or the database itself.

Could you please investigate the Database View SSH connection for this MySQL service?

I would especially appreciate confirmation of whether there is a platform-side issue with the Database View SSH tunnel or its authentication flow.

Project: pleasant-light

Environment: production

MySQL service: MySQL-Lilica_Vendas

Thank you.

Solved$10 Bounty

0 Replies

Status changed to Awaiting Railway Response Railway • about 1 month ago


Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 1 month ago


Status changed to Solved flavioathaide • about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...