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

Should change local setup instruction, because MySQL version and password issue #6

Closed
ddinggu opened this issue Mar 7, 2019 · 3 comments

Comments

@ddinggu
Copy link

ddinggu commented Mar 7, 2019

Follow your basic setup instruction, I occurred two error in create db.

  1. MySQL version issue > 8.0
$ node_modules/.bin/sequelize db:create

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

It occurs when I follow your setup instruction and find why it occurs because MySQL uses new authentication plugin caching_sha2_password but, Node.js driver MySQL don't support this plugin not yet.
(https://stackoverflow.com/questions/50373427/node-js-cant-authenticate-to-mysql-8-0/50377944#50377944)

So, I alter root user to older authentication plugin for works Sequelize.

$ mysql -uroot 

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<mypassword>';
  1. MySQL root password incorrect in local and config.json environments
$ node_modules/.bin/sequelize db:create

ERROR: Access denied for user 'root'@'localhost' (using password: NO)

This error resolve with change development environment password in config.json

config/config.js 
{
  "development": {
    "username": "root",
    "password": "<mypassword>",
    "database": "koreanjson_development",
    "host": "127.0.0.1",
    "dialect": "mysql"
  },
  ...
}

And everything is fine.

I'm not sure this error occurs only to me and those are best solutions, but please consider this issues.

Thank you.


Environment :
OS: Mac High Sierra 10.13.6
Node: 10.14.2
Sequelize CLI: 5.4.0
ORM: 4.42.0
mysql: 8.0.15 for osx10.13 on x86_64 (Homebrew)

@ddinggu ddinggu changed the title Follow basic setup instruction, two errors in MySQL issue Should change local setup instruction, because MySQL version and password issue Mar 7, 2019
@sunnysid3up
Copy link

Same issue happened to me. I had to change the mysql password also to make it work. Make sure to not include the config file changes when you commit :)

@ddinggu
Copy link
Author

ddinggu commented Mar 9, 2019

README에 이 이슈에 대한 간단한 안내 추가했으면 좋겠습니다 😄

@jd1386
Copy link
Owner

jd1386 commented Mar 11, 2019

감사합니다. 각자의 데이터베이스 환경별 아이디와 비밀번호를 넣으라고 안내하도록 하겠습니다.

@jd1386 jd1386 closed this as completed Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants