繁体   English   中英

玩框架MySQL和EBean

[英]play Framework MySQL and EBean

所以我试图在服务器上部署我的play Framework 2.3.5。 我已将其与MySQL数据库(最新版本)连接,并使用EBean进行持久化。

我的1.sql脚本如下所示:

# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions

# --- !Ups

create table input (
  id                        varchar(255) not null auto_increment,
  text                      TEXT not null,
  mode                      varchar(255) not null,
  theme                     varchar(255) not null,
  title                     varchar(255) not null,
  PRIMARY KEY (id)
)
;




# --- !Downs

drop table input;

出于这个原因,我发布了我的错误消息:

[info] play - database [default] connected at jdbc:mysql://localhost/pastedemo
[error] play - 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 'sequence input_seq' at line 1 [ERROR:1064, SQLSTATE:42000]
Oops, cannot start the server.
@6kaijj99g: Database 'default' is in an inconsistent state!

谁能告诉我我的错在哪里? :)

好的,我解决了问题。 这很容易。

当您想在生产模式下使用应用程序时,必须删除1.sql。 然后使用activator dist打包您的应用程序并将其上传到您的服务器上。 不要再次run测试它。 之后,您可以部署它并且它可以工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM