ejabberd 16.06 + mysql 5.5.50, message history is not saved(ejabberd 16.06 + mysql 5.5.50,不保存消息历史)
问题描述
我用的是ejabberd 16.06 + mysql 5.5.50,消息历史没有保存.
I use ejabberd 16.06 + mysql 5.5.50, message history is not saved.
我的 ejabberd.yml:
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
为了形成数据库结构,我使用了:mysql.sql
for the formation of the database structure, I used: mysql.sql
我收到一个错误:
@ejabberd_sql:check_error:1039 SQL 查询 'SELECT 时间戳,xml,peer,
kind, nick FROM (SELECT 时间戳, xml, peer, kind, nick FROM archive
WHERE username='test' 和bare_peer='misha@freldo' 按时间戳排序
DESC 限制 21) AS t ORDER BY 时间戳 ASC;'失败:#42S22Unknown
字段列表"中的种类"列"
@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.
推荐答案
将您的 mysql 升级到 5.6+ 版本应该可以解决您的问题.
Upgrading your mysql to version 5.6+ should solve your problem.
ejabberd 在 InnoDB 中使用 FULLTEXT 索引.因此,你需要MySQL 5.6 或更高版本与 ejabberd 一起使用.
ejabberd make use of FULLTEXT indexes with InnoDB. Thus, you need MySQL 5.6 or greater to use with ejabberd.
注意:如果您不将消息存档存储在数据库中,则可以尝试使用较旧的 5.5 版本.您可能需要适配 MySQL 数据库架构以应对那些较旧的 MySQL 版本.
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 5.6.4 或更高版本是 推荐 如果您想存储消息历史记录.
MySQL version 5.6.4 or higher is recommended if you want to store message history.
这篇关于ejabberd 16.06 + mysql 5.5.50,不保存消息历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ejabberd 16.06 + mysql 5.5.50,不保存消息历史
基础教程推荐
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 在多列上分布任意行 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
