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

devxeazy
HOBBY

a year ago

Even with the correct access, I am not allowed to access my database

Solved

11 Replies

a year ago

Please make sure you are using all the necessary environment variables correctly.


devxeazy
HOBBY

a year ago

I'm using it, I've done it before, it's the same process as always.It's like I blocked my PC


a year ago

Where is your database hosted.


devxeazy
HOBBY

a year ago

railway , dock image


a year ago

Your credentials and or environment variables are wrong, a Railway hosted database would not be running at 100.64.0.5


devxeazy
HOBBY

a year ago

The process I followed was as follows:

I just created the database via railway

Then I used the credentials to try to connect to the bank

MYSQLDATABASE      railway
MYSQLHOST          viaduct.proxy.rlwy.net
MYSQLPASSWORD      mypass 
MYSQLPORT          57900
MYSQLUSER          root
MYSQL_DATABASE     railway

a year ago

You have configured something incorrectly, please review your code and configurations.


devxeazy
HOBBY

a year ago

This is impossible because I used the default template


mohamednsiri
TRIAL

a year ago

same problem, wont solve


etiquetasio
PRO

8 months ago

The problem is, after your first deploy the database name is "railway", if you change database name to another one you should detach current VOLUME, delete and recreate a new one, pointing to /var/lib/mysql... The new deploy will recreate the Database with right credentials and now you can connect with root with your new custom database name. If you dont recreate the volume, the current database will not have new root credentials for this database.

This "fix" is for mysql default railway template.

Warning: This is only for new deploys, because recreate volume will destroy your database.

Hope it helps.


8 months ago

Key point.

This is only for new deploys because recreating the volume will destroy your database.

It's simply best not to touch the variables.


Access denied for user 'root'@'100.64.0.5' (using password: YES) - Railway Help Station