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

Missing driver for MYSQL 5.*? #3664

Closed
NisuSan opened this issue Jan 3, 2025 · 1 comment
Closed

Missing driver for MYSQL 5.*? #3664

NisuSan opened this issue Jan 3, 2025 · 1 comment
Labels

Comments

@NisuSan
Copy link

NisuSan commented Jan 3, 2025

Bug Description

When attempting to connect to a MySQL 5.* database, the following error occurs:

Error: Database(MySqlDatabaseError { code: Some("28000"), number: 1045, message: "Access denied for user 'User'@'ip' (using password: NO)" })

This error fires if select wrong driver - test it with DataGrip 2023.1.2
The same connection parameters work without issues on MySQL 8.*.

Minimal Reproduction

use sqlx::mysql::MySqlPoolOptions;

#[tokio::main]
async fn main() -> Result<(), sqlx::Error> {
    let pool = MySqlPoolOptions::new()
        .max_connections(5)
        .connect("mysql://User:Password@host:3306/database_name")
        .await?;

    Ok(())
}

Info

  • SQLx version: 0.8
  • SQLx features enabled: mysql
  • Database server and version: 5., 8.
  • Operating system: Windows
  • rustc --version: rustc 1.83.0 (90b35a623 2024-11-26)
@NisuSan NisuSan added the bug label Jan 3, 2025
@abonander
Copy link
Collaborator

MySQL 5 has reached end-of-life. While it worked with past releases of SQLx, there is no guarantee that it works with the current release. I recommend double-checking your parameters and configuration, and maybe following this guide: https://dev.mysql.com/doc/mysql-security-excerpt/5.7/en/problems-connecting.html

From the error, it appears MySQL thinks you have not sent a password, so be sure it's not an issue with the password itself (does it contain characters that need to be URL-encoded?), or the configured default authentication plugin.

@abonander abonander closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants