Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login fails using caching_sha2_password #84

Open
4UjwXc opened this issue Jan 14, 2025 · 0 comments
Open

Login fails using caching_sha2_password #84

4UjwXc opened this issue Jan 14, 2025 · 0 comments

Comments

@4UjwXc
Copy link

4UjwXc commented Jan 14, 2025

If a password with more than 18 characters is used, the login to a MySQL database fails when using the 'caching_sha2_password' plugin.

DBMS: MySQL (ver. 8.3.0)
Driver: org.mariadb:r2dbc-mariadb:1.3.0

You can use this to reproduce:

`CREATE USER 'myUser'@'%' IDENTIFIED
WITH 'caching_sha2_password'
BY 'MySuperPasswordIsVeryLong';

GRANT ALL PRIVILEGES
ON db.*
TO 'myUser'@'%';

FLUSH PRIVILEGES;`

Simple Java Class trying to connect:

`package com.example;

import org.mariadb.r2dbc.MariadbConnectionConfiguration;
import org.mariadb.r2dbc.MariadbConnectionFactory;
import org.mariadb.r2dbc.SslMode;

public class Main {
public static void main(String[] args) {
MariadbConnectionConfiguration conf = MariadbConnectionConfiguration.builder()
.allowPublicKeyRetrieval(true)
.sslMode(SslMode.DISABLE)
.host("localhost")
.port(3306)
.username("myUser")
.password("MySuperPasswordIsVeryLong")
.database("db")
.build();
MariadbConnectionFactory factory = new MariadbConnectionFactory(conf);
factory.create().block();
}
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant