Skip to content

Cannot cannect to a mysql:8.0.33 server with caching_sha2_password auth mechanism  #1623

@erfanium

Description

@erfanium

Issue description

I can't simply connect to my mysql server because caching_sha2_password not supported

Example code

func main() {
	conn, err := client.Connect(.......)
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	r, _ := conn.Execute(`select 1;`)
	println(r.AffectedRows)

}

Error log

panic: ERROR 1045 (28000): Access denied for user 'base-user'@'%' (using password: YES)

Configuration

Driver version (or git SHA): v1.8.0

Go version: 1.22.2

Server version: MySQL 8.0.33

same exact code with node.js and mysql2 package works:

const { createConnection } = require("mysql2/promise");

async function main() {
  const connection = await createConnection({ ...... });

  const [rows] = await connection.query("select 1");
  console.log(rows);
}

main();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions