Sequelize不会支持MySQL 8自动化协议,我也不会更改该协议 [英] Sequelize does not suport the MySQL 8 autentication protocol and I'm not getting how to change this protocol

查看:305
本文介绍了Sequelize不会支持MySQL 8自动化协议,我也不会更改该协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Sequelize与MySQL 8.0.15一起迁移数据库,但是我无法做到这一点.我一直收到此错误消息.

I'm trying to migrate a db with Sequelize working with MySQL 8.0.15, but I'm not able to do that. I keep receiving this error message.

Sequelize CLI [Node: 10.15.0, CLI: 5.4.0, ORM: 5.3.5]

Loaded configuration file "config/config.json".
Using environment "development".

ERROR: Client does not support authentication protocol requested by server; consider upgrading MySQL client

我已经为这个问题尝试了每种解决方案.问题是,当我尝试更改MySQL根密码时,我得到的消息是:

I've tried every single solution for this problem. The thing is when i try to change the MySQL root password the message i get is this one:

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

然后我确实尝试按照此过程更改密码验证策略

Then I did try to change the password validate policy following this procedure

https://dev.mysql.com/doc/refman/5.6/en/validate-password-installation.html

然后MySQL崩溃,因为它已被弃用.然后我尝试了这个

then MySQL crashed cause it's deprecated. Then I tried this one

https://dev.mysql.com/doc/refman/8.0/en/validate-password-installation.html

然后我得到了

mysql> INSTALL COMPONENT 'file://component_validate_password';
ERROR 3529 (HY000): Cannot load component from specified URN: 
'file://component_validate_password'.

然后我检查了组件在哪里

Then I checked where the component is

ls /usr/lib64/mysql/plugin/component_v*
/usr/lib64/mysql/plugin/component_validate_password.so

任何人都可以帮忙吗?我真的没有选择了!

Anyone can help? I'm realy out of options, now!

预先感谢

推荐答案

如果要使用MySQL 5.x样式认证,通常要做的就是将其添加到my.cnf:

If you want to use MySQL 5.x style authentication, typically all you have to do is add this to your my.cnf:

[mysqld]
default_authentication_plugin=mysql_native_password

在添加任何用户之前执行此操作.仅使用用户通过Sequelize进行连接,而不使用root.

Do this before adding any users. Only use users for connecting via Sequelize, never root.

这篇关于Sequelize不会支持MySQL 8自动化协议,我也不会更改该协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆