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

ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MariaDB client #2001

Open
ameijboom opened this issue Apr 19, 2018 · 9 comments

Comments

@ameijboom
Copy link

ameijboom commented Apr 19, 2018

I'm trying to connect my Discord bot to my server's MySQL database, but everytime I try to run the bot I get the following error:

let conn = mysql.createConnection({ insecureAuth : true, host : config.mysql.host, user : config.mysql.user, password : config.mysql.password, database : config.mysql.database });

config.json:
{ "token":"bottoken", "prefix":"m!", "mysql": { "host":"localhost", "user":"root", "password":"apassword!", "database":"aphi" } }

@dougwilson
Copy link
Member

We could add more auth methods, of course. What auth method is your server using?

@ameijboom
Copy link
Author

Where can I see which auth method my server uses ? (Sorry, I'm not that smart when it comes to MySQL & servers)

@dougwilson
Copy link
Member

No problem. I'm not at a computer right now, but I think it is one of the columns in the mysql.user system table row for the user you are trying to authenticate as.

@ameijboom
Copy link
Author

It says my auth method is unix_socket
image

@sidorares
Copy link
Member

duplicate of #1507

@sidorares
Copy link
Member

well, kind of, need to confirm if auth_socket in mysql is same as unix_socket in mariadb. I think both rely on SO_PEERCRED

@Eug13
Copy link

Eug13 commented Dec 4, 2018

just run that mySQL query command in workbench or other mySQL client :
'root' should be your 'username' or 'root' and where 'password' your 'password'

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'

@karocksjoelee
Copy link

is there a solution for this ? other than ALTERing USER ?

@mysqljs mysqljs deleted a comment from MohammadJouza May 30, 2019
@mysqljs mysqljs deleted a comment from sidorares May 30, 2019
@mysqljs mysqljs deleted a comment from karocksjoelee May 30, 2019
@mysqljs mysqljs deleted a comment from sidorares May 30, 2019
@mysqljs mysqljs deleted a comment from jgwinner May 30, 2019
@mysqljs mysqljs deleted a comment from sidorares May 30, 2019
@mysqljs mysqljs deleted a comment from jgwinner May 30, 2019
@mysqljs mysqljs deleted a comment from jgwinner May 30, 2019
@mysqljs mysqljs deleted a comment from sidorares May 30, 2019
@mysqljs mysqljs deleted a comment from jgwinner May 30, 2019
@mysqljs mysqljs deleted a comment from sidorares May 30, 2019
@mysqljs mysqljs deleted a comment from jgwinner May 30, 2019
@mysqljs mysqljs deleted a comment from DestroyerIV May 30, 2019
@mysqljs mysqljs deleted a comment from jgwinner May 30, 2019
@mysqljs mysqljs deleted a comment from jgwinner May 30, 2019
@mysqljs mysqljs deleted a comment from jgwinner May 30, 2019
@mysqljs mysqljs deleted a comment from nmggithub May 30, 2019
@mysqljs mysqljs deleted a comment from nmggithub May 30, 2019
@mysqljs mysqljs deleted a comment from nmggithub May 30, 2019
@dougwilson
Copy link
Member

This issue is specific to the original report issue, which is to support the unit_socket auth plugin (#2001 (comment)). Please create a new issue if your issue is not related to the unix_socket plugin.

@mysqljs mysqljs locked and limited conversation to collaborators May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants