Skip to content

auth: sha256_password plugin with unix transport not working #1245

Closed
@santhosh-tekuri

Description

@santhosh-tekuri

I have configured mysql user as below:

CREATE USER 'sha256_user'@'%' IDENTIFIED WITH sha256_password BY 'sha256_secret';

now when i connect to mysql using mysql.sock file, authentication fails. I get following error:

Error 1045: Access denied for user 'sha256_user'@'localhost' (using password: YES)

i debugged driver code, and found that we are sending password in cleartext if it is unix transport. instead if we send encrypted on unix transport it succeeds.

to be precise, if we change auth.go:277
from:

if mc.cfg.tls != nil || mc.cfg.Net == "unix" {

to:

if mc.cfg.tls != nil {

it works.

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