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 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- SQL 临时表问题 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 更改自动增量起始编号? 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01