mysql 8 or mysql 9 with native password authentication

impondeskPRO

3 months ago

Unable to connect mysql using native password (using xmysql - nodejs app)

Solved

11 Replies

impondeskPRO

3 months ago

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client


impondeskPRO

3 months ago

Added --default-authentication-plugin=mysql_native_password to support in docker start command, and tried to chnage user priviledges etc. Failed. Kndly assist.


impondeskPRO

3 months ago

https://simple-xmysql-production.up.railway.app/api/tables

{"error":{"code":"ER_NOT_SUPPORTED_AUTH_MODE","errno":1251,"sqlMessage":"Client does not support authentication protocol requested by server; consider upgrading MySQL client","sqlState":"08004","fatal":true}}

3 months ago

You didn't happen to change the default password?


Status changed to Awaiting User Response railway[bot] 3 months ago


impondeskPRO

3 months ago

Yes, even unable to change the same via sql queries also. Can you please assist on this. Blocked!


Status changed to Awaiting Railway Response railway[bot] 3 months ago


3 months ago

I'm sorry- did you change the password, yes or no?


Status changed to Awaiting User Response railway[bot] 3 months ago


impondeskPRO

3 months ago

I am unable to change password.


Status changed to Awaiting Railway Response railway[bot] 3 months ago


3 months ago

Then I don't know how to help you in this case.


Status changed to Awaiting User Response railway[bot] 3 months ago


impondeskPRO

3 months ago

Do we have any support or working session to help here?


Status changed to Awaiting Railway Response railway[bot] 3 months ago


impondeskPRO

3 months ago

CREATE USER 'new_user'@'%' IDENTIFIED WITH mysql_native_password BY 'app_secret_pwd'; results Error Code: 1524. Plugin 'mysql_native_password' is not loaded.

Alternatibely I planned to load while start command, unable to start db leads to crash instance (as mysqld --initialize-insecure --default-authentication-plugin=mysql_native_password && mysqld)

Tried to install Mysql instance using docker image as -

FROM mysql:8

# Set MySQL environment variables

ENV MYSQL_ROOT_PASSWORD=root

# Ensure MySQL data directory exists

RUN mkdir -p /var/lib/mysql && chown -R mysql:mysql /var/lib/mysql

# Run MySQL with necessary flags

CMD ["mysqld", "--default-authentication-plugin=mysql_native_password", "--innodb-use-native-aio=0"]

None of the options worked, my request was to add mysql_native_password plugin for instance to proceed. Let usknow, If we can have some working session or backend support to handle this issue.


3 months ago

Heya, unfortunately this isn't a platform issue so we can't help much further.

However, notable from mysql's website:

The mysql_native_password authentication plugin is deprecated as of MySQL 8.0.34, disabled by default in MySQL 8.4, and removed as of MySQL 9.0.0.

https://dev.mysql.com/doc/refman/8.4/en/native-pluggable-authentication.html

so pulling the default 8 docker tag would likely not have the plugin.


Status changed to Awaiting User Response railway[bot] 3 months ago


Status changed to Solved itsrems 3 months ago


mysql 8 or mysql 9 with native password authentication - Railway Help Station