Molunerfinn / vue-koa-demo

:beginner:A simple full stack demo(CSR & SSR & Docker Support) written by Vue2 & Koa2(Koa1 verson also completed)
MIT License
756 stars 166 forks source link

库主是用什么版本的linux系统?安装yarn add sequelize mysql #39

Closed sonygod closed 5 years ago

sonygod commented 5 years ago

首先,这个git我可以顺利clone并运行,我想按照教程走一遍,遇到些问题

库主是用什么版本的linux系统?安装yarn add sequelize mysql

按照教程安装完成后,指向序列化数据库生成对应的js老是提示没有安装mysql?

sequelize-auto -o "./schema2" -d todolist -h 127.0.0.1 -u root -p 3306 -x root -e mysql

**Error: Please install mysql package manually**

sequelize-auto -o "./schema2" -d todolist -h 127.0.0.1 -u root -p 3306 -x root-e mysql

我的是ubuntu18.04,mysql版本是

mysql Ver 14.14 Distrib 5.5.60, for Linux (x86_64) using readline 5.1

Molunerfinn commented 5 years ago

我没用Linux,用的是Windows或者macOS,mysql版本是5.7

sonygod commented 5 years ago

额,好的,我再研究下,最后反馈到这里。

Molunerfinn commented 5 years ago

image sequelize-auto如果你要在命令行里直接使用的话,需要全局安装一下node的mysql驱动

Molunerfinn commented 5 years ago

如果放在npm scripts里使用就可以不用全局装了。

sonygod commented 5 years ago

找到问题了 **yarn add sequelize mysql**

改为

yarn global add sequelize

yarn global add mysql