简体   繁体   中英

failed to create table in openfire mysql database

I am creating an openfire database in mysql but whenvever i try to create it, it shows 'The Openfire database schema does not appear to be installed. Follow the installation guide to fix this error.'.

Log

    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)

This error comes up everytime while creating the openfire db tables

Any help will be appreciated Thanks in advance

'rank' is, as of MySQL 8.0.2, a reserved keyword, which causes this query to fail. A fix for this issue has been provided in version 4.3.0 of Openfire.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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