未能在openfire mysql数据库中创建表

7dl7o3gd  于 2021-06-18  发布在  Mysql
关注(0)|答案(1)|浏览(412)

我正在mysql中创建一个openfire数据库,但是当我尝试创建它时,它显示“openfire数据库模式似乎没有安装。请按照安装指南修复此错误。“。
日志

2018.12.01 14:40:48 org.jivesoftware.database.SchemaManager - SchemaManager: Failed to execute SQL:
 CREATE TABLE ofRosterGroups (   rosterID              BIGINT          NOT NULL,   rank                  TINYINT         NOT NULL,   groupName             VARCHAR(255)     NULL,   PRIMARY KEY (rosterID, rank),   INDEX ofRosterGroup_rosterid_idx (rosterID) );
2018.12.01 14:40:48 org.jivesoftware.database.SchemaManager - 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 'rank                  TINYINT         NOT NULL,   groupName             VARCHAR(' at line 1
java.sql.SQLSyntaxErrorException: 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 'rank                  TINYINT         NOT NULL,   groupName             VARCHAR(' at line 1
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
    at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:781)
    at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666)
    at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)

每次创建openfiredb表时都会出现此错误
如有任何帮助,我们将不胜感激

ekqde3dh

ekqde3dh1#

从mysql 8.0.2开始,“rank”是一个保留关键字,它会导致此查询失败。openfire的4.3.0版本中提供了此问题的修复程序。

相关问题