【发布时间】:2018-12-03 03:55:24
【问题描述】:
当我尝试连接 mysql 8.0 时,我收到了这个错误。我怎样才能解决这个问题 ?
code: 'ER_NOT_SUPPORTED_AUTH_MODE',
errno: 1251,
sqlMessage: 'Client does not support authentication protocol requested by server;
consider upgrading MySQL client',
sqlState: '08004',
fatal: true
【问题讨论】:
-
服务器请求的身份验证协议是什么以及您使用的是哪个 - 这就是您应该寻找的地方
-
@Rupesh:更改
plugin字段,因为它设置为“auth_socket”。use mysql; update user set authentication_string=password(''), plugin='mysql_native_password' where user='root';查看此链接:Click here -
@Manav 我正在使用 mysql 8.0.11,我已经尝试过
mysql> use mysql; Database changed mysql> update user set password=PASSWORD("helloworld") where User='root';它说:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '("helloworld") where User='root'' at line 1 -
请检查您的语法/代码。错误与此有关。 Click here
标签: mysql node.js database backend