首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用本地现有数据库进行prisma?当我尝试时,我得到了以下错误

如何使用本地现有数据库进行prisma?当我尝试时,我得到了以下错误
EN

Stack Overflow用户
提问于 2020-02-12 18:09:43
回答 1查看 1.4K关注 0票数 0

这是错误:

代码语言:javascript
复制
reverie-pc@reveriepc-Latitude-3400:~/VasanthkumarV/prisma$ sudo npm install -g prisma
[sudo] password for reverie-pc:
npm WARN deprecated request@2.88.2: request has been deprecated, see 
https://github.com/request/request/issues/3142
/usr/bin/prisma -> /usr/lib/node_modules/prisma/dist/index.js
+ prisma@1.34.10
updated 1 package in 29.734s
(base) reverie-pc@reveriepc-Latitude-3400:~/VasanthkumarV/prisma$ prisma init test
? Set up a new Prisma server or deploy to an existing server? Use existing database
? What kind of database do you want to deploy to? MySQL
? Does your database contain existing data? Yes
? Enter database host localhost
? Enter database port 3306
? Enter database user root
? Enter database password [hidden]
? Please select the schema you want to introspect database_test
Introspecting database database_test 435ms
Created datamodel definition based on 24 tables.
? Select the programming language for the generated Prisma client Prisma JavaScript Client
Created 3 new files:                                                                          

  prisma.yml           Prisma service definition
  datamodel.prisma    GraphQL SDL-based datamodel (foundation for database)
  docker-compose.yml   Docker configuration file

Next steps:

  1. Open folder: cd test
  2. Start your Prisma server: docker-compose up -d
  3. Deploy your Prisma service: prisma deploy
  4. Read more about introspection:url
 ▸    Syntax Error: Expected Name, found Int "1"

Get in touch if you need help: https://slack.prisma.io/
To get more detailed output, run $ export DEBUG="*"
(node:14055) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

Generating schema... !

如何解决这个error..and连接Prisma服务器和本地数据库(MySQL)的步骤是什么?那么prisma部署呢??

如何将prisma与现有的数据库连接?

EN

回答 1

Stack Overflow用户

发布于 2020-02-12 23:47:21

看起来您使用的是Prisma 1,它目前在maintenance mode中。

鉴于这看起来像是一个新项目,我建议你看看Prisma 2,它包含了许多改进和一个更简单的心理模型。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60185810

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档