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

数据库的备份和导入怎么操作呢,有相关资料或插件名吗 #2

Open
xiaoyanbin opened this issue Dec 13, 2018 · 9 comments

Comments

@xiaoyanbin
Copy link

数据库的备份和导入怎么操作呢,有相关资料或插件名吗

@ruiyong-lee
Copy link
Owner

ruiyong-lee commented Dec 13, 2018

新建数据库“weapp-vue-eggjs-shop-demo”,如果你密码和我配置的不一样,那需要修改下项目里面的config.default.js,我默认写的是我的密码,然后app-server目录下运行“npm run db:up”,就可以迁移数据库,初始化表和建了一个管理员账号

@zuumau
Copy link

zuumau commented Apr 2, 2019

非常感谢

@testone1515
Copy link

新建数据库“weapp-vue-eggjs-shop-demo”,如果你密码和我配置的不一样,那需要修改下项目里面的config.default.js,我默认写的是我的密码,然后app-server目录下运行“npm run db:up”,就可以迁移数据库,初始化表和建了一个管理员账号

你好,我在mysql里面建表的时候,报了这个错,能帮我看看?我对数据库不熟,谢谢
mysql> create database weapp-vue-eggjs-shop-demo;
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 '-vue-eggjs-shop-demo' at line 1

@ruiyong-lee
Copy link
Owner

ruiyong-lee commented Apr 10, 2019

@testone1515 这样试一下可以么:create database `weapp-vue-eggjs-shop-demo`

@testone1515
Copy link

create database weapp-vue-eggjs-shop-demo

谢谢,现在好了。

@Richardsh
Copy link

你好我是先新建数据库,然后定位到server_eggjs目录,输入 npm run db:up就会报错
npm run db:up

[email protected] db:up
npx sequelize db:migrate

npm ERR! could not determine executable to run

npm ERR! A complete log of this run can be found in:

@ruiyong-lee
Copy link
Owner

@Richardsh 是不是没安装sequelize-cli,请参考官方文档:https://eggjs.org/zh-cn/tutorials/sequelize.html

@E236266566
Copy link

image
image
image
image
这是怎么回事啊 出现那个错误

@E236266566
Copy link

家人们我找出原因了感谢

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

6 participants