ejabberd 16.06 + mysql 5.5.50, message history is not saved

喜你入骨 提交于 2019-12-20 07:28:44

问题


I use ejabberd 16.06 + mysql 5.5.50, message history is not saved.

My ejabberd.yml:

## MySQL server:

odbc_type: mysql 
odbc_server: "freldo"
odbc_port: 3306
odbc_database: "ejabberd"
odbc_username: "ejabberd" 
odbc_password: "ejabberd"

modules: 
... 
mod_mam: 
   db_type: odbc 
   default: always

for the formation of the database structure, I used: mysql.sql

I get an error:

@ejabberd_sql:check_error:1039 SQL query 'SELECT timestamp, xml, peer,
kind, nick FROM (SELECT timestamp, xml, peer, kind, nick FROM archive
WHERE username='test' and bare_peer='misha@freldo' ORDER BY timestamp
DESC limit 21) AS t ORDER BY timestamp ASC;' failed: "#42S22Unknown
column 'kind' in 'field list'"

I have not saved message history in database.


回答1:


Upgrading your mysql to version 5.6+ should solve your problem.

ejabberd make use of FULLTEXT indexes with InnoDB. Thus, you need MySQL 5.6 or greater to use with ejabberd.

Note: If you do not store message archive in database however, you can try using older 5.5 version. You may need to adapt MySQL database schema to cope with those older MySQL versions.

MySQL version 5.6.4 or higher is recommended if you want to store message history.



来源:https://stackoverflow.com/questions/38808877/ejabberd-16-06-mysql-5-5-50-message-history-is-not-saved

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!