Coder Social home page Coder Social logo

Comments (11)

lfb avatar lfb commented on May 12, 2024

运行 npm run dev 报错,本地建立的有boblog数据库

SEQUELIZE0002] DeprecationWarning: The logging-option should be either a function or false. Default: console.log
Unhandled rejection SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at /Users/edz/nodejs-koa-blog/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:133:19
at tryCatcher (/Users/edz/nodejs-koa-blog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/edz/nodejs-koa-blog/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/Users/edz/nodejs-koa-blog/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/edz/nodejs-koa-blog/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/edz/nodejs-koa-blog/node_modules/bluebird/js/release/promise.js:725:18)
at _drainQueueStep (/Users/edz/nodejs-koa-blog/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/Users/edz/nodejs-koa-blog/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/edz/nodejs-koa-blog/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/edz/nodejs-koa-blog/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:439:21)

  1. 首先检查一下config.js配置文件里面的本地数据库密码是否正确?
  2. 然后检测一下是否被占用端口?

from nodejs-koa-blog.

liuyong avatar liuyong commented on May 12, 2024

进入mysql,跑一下语句,我的mysql8.0亲测成功:
mysql> use mysql;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword';
其中,YourRootPassword是你的mysql密码。

旧版本mysql 是跑 :
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword';
FLUSH PRIVILEGES;

from nodejs-koa-blog.

lixiaofa avatar lixiaofa commented on May 12, 2024

$ cnpm run dev

[email protected] dev E:\nodejs-koa-blog-master
nodemon app.js

'nodemon' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: nodemon app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jion\AppData\Roaming\npm-cache_logs\2019-12-13T09_52_25_989Z-debug.log

大佬会报这个错 , 启动不了应该和数据库没关系 啊

from nodejs-koa-blog.

lfb avatar lfb commented on May 12, 2024

$ cnpm run dev

[email protected] dev E:\nodejs-koa-blog-master
nodemon app.js

'nodemon' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: nodemon app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jion\AppData\Roaming\npm-cache_logs\2019-12-13T09_52_25_989Z-debug.log

大佬会报这个错 , 启动不了应该和数据库没关系 啊

貌似不是,你 npm install 安装依赖包了么?然后看下debug log日志,看看是什么问题,或许你现在拉取一下最新代码启动一下

from nodejs-koa-blog.

lixiaofa avatar lixiaofa commented on May 12, 2024

装了,没装Redis

from nodejs-koa-blog.

lixiaofa avatar lixiaofa commented on May 12, 2024

ok, 谢谢

from nodejs-koa-blog.

lixiaofa avatar lixiaofa commented on May 12, 2024

个人觉得 design这个做ui框架 form 不太好用,是个坑

from nodejs-koa-blog.

lixiaofa avatar lixiaofa commented on May 12, 2024

还是不行

from nodejs-koa-blog.

yhzddy avatar yhzddy commented on May 12, 2024

还是不行

是缺少nodemon依赖包,packjson里面没有写这条依赖
npm install nodemon --save-dev
在npm run dev就可以了

from nodejs-koa-blog.

Richardsh avatar Richardsh commented on May 12, 2024

进入mysql,跑一下语句,我的mysql8.0亲测成功:
mysql> use mysql;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword';
其中,YourRootPassword是你的mysql密码。

旧版本mysql 是跑 :
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword';
FLUSH PRIVILEGES;

我的还是不行,同样的报错,这里是 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '11111' 密码必须加上单引号么?

from nodejs-koa-blog.

vologo avatar vologo commented on May 12, 2024

进入mysql,跑一下语句,我的mysql8.0亲测成功: mysql> use mysql; mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword'; 其中,YourRootPassword是你的mysql密码。

旧版本mysql 是跑 : ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword'; FLUSH PRIVILEGES;

mysql8 亲测可用

from nodejs-koa-blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.