MySQL Crashed since moving to EU Servers - Plugin 'mysql_native_password' is not loaded
seemus
PROOP

14 days ago

Moved my database to EU servers. Had to update MYSQL to new version to fit with EU Servers.

However, Now i get: Plugin 'mysql_native_password' is not loaded.

I am unable to get onto the server to change the authentication plugin for my MySQL user from mysql_native_password to caching_sha2_password.

Site currently down in the meantime.

Solved$10 Bounty

Pinned Solution

diogoribeirodev
FREETop 5% Contributor

14 days ago

something like this railway ssh --service <mysql-service>
it will connect you to the database.

17 Replies

seemus
PROOP

14 days ago

Im reverting back to US servers for now. As the site has been down too long, but would like to get an idea on how to fix this so we can revert back to EU servers.


seemus

Im reverting back to US servers for now. As the site has been down too long, but would like to get an idea on how to fix this so we can revert back to EU servers.

seemus
PROOP

14 days ago

That didnt make any difference


diogoribeirodev
FREETop 5% Contributor

14 days ago

You could add --mysql-native-password=ON to the Custom Start Command or environment variables in your Railway MySQL service settings. But i am not sure if it will work.


diogoribeirodev
FREETop 5% Contributor

14 days ago

Also what version of MySQL are you using? 8? 9?


diogoribeirodev

Also what version of MySQL are you using? 8? 9?

seemus
PROOP

14 days ago

Not entirely sure what its loaded up but looks like 9


seemus

Not entirely sure what its loaded up but looks like 9

seemus
PROOP

14 days ago

MySQL Server 8.4.8-1.el9


diogoribeirodev
FREETop 5% Contributor

14 days ago

Yeah in that version mysql_native_password is no longer supported


diogoribeirodev
FREETop 5% Contributor

14 days ago

A solution would be to downgrade to 8.4 where it's still supported.


diogoribeirodev

Yeah in that version mysql_native_password is no longer supported

seemus
PROOP

14 days ago

Yes I need to change the authentication plugin for my MySQL user from mysql_native_password to caching_sha2_password. - Any ideas?


diogoribeirodev
FREETop 5% Contributor

14 days ago

You can run:

Run this to get the users that are using the old plugin:

SELECT User, Host, plugin FROM mysql.user WHERE plugin = 'mysql_native_password';

Then update the root user to use the caching_sha2_password plugin, i think you can leave the old password:

ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'new_password';

Using caching_sha2_password will require you to use a library compatible with it, like in nodejs you will need to use mysql2 instead of mysql.


diogoribeirodev

You can run:Run this to get the users that are using the old plugin:SELECT User, Host, plugin FROM mysql.user WHERE plugin = 'mysql_native_password';Then update the root user to use the caching_sha2_password plugin, i think you can leave the old password:ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'new_password';Using caching_sha2_password will require you to use a library compatible with it, like in nodejs you will need to use mysql2 instead of mysql.

seemus
PROOP

14 days ago

How do I run that if I cannot connect to the database?


diogoribeirodev
FREETop 5% Contributor

14 days ago

You don't have access to the database/railway project?


seemus
PROOP

14 days ago

I have access to railway via CLI, but I cannot connect to the database due to ERROR 1524 (HY000): Plugin 'mysql_native_password' is not loaded


diogoribeirodev
FREETop 5% Contributor

14 days ago

You can use railway ssh to connect to the railway service ( database )
https://docs.railway.com/cli/ssh


diogoribeirodev
FREETop 5% Contributor

14 days ago

something like this railway ssh --service <mysql-service>
it will connect you to the database.


seemus
PROOP

14 days ago

Great, we are in and solved. Thanks a bunch!


diogoribeirodev
FREETop 5% Contributor

14 days ago

You're welcome!


Status changed to Solved sam-a 14 days ago


Loading...