Hibernate: create table course (id integer not null auto_increment, index integer, name varchar(255), primary key (id)) engine=InnoDB
十月 12,20214:31:05 下午 org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN:GenerationTarget encountered exception accepting command :Error executing DDL "create table course (id integer not null auto_increment, index integer, name varchar(255), primary key (id)) engine=InnoDB" via JDBC Statementorg.hibernate.tool.schema.spi.CommandAcceptanceException:Error executing DDL "create table course (id integer not null auto_increment, index integer, name varchar(255), primary key (id)) engine=InnoDB" via JDBC Statement...Hibernate: create table student (id integer not null auto_increment, name varchar(255), primary key (id)) engine=InnoDB...Caused by:java.sql.SQLSyntaxErrorException:You have an error in your SQL syntax; check the manual that corresponds toyourMySQL server version for the right syntax touse near 'integer, name varchar(255), primary key (id)) engine=InnoDB' at line 1
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:762)
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:646)
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)...36 more