【问题标题】:ejabberd MySQL connection errorejabberd MySQL连接错误
【发布时间】:2014-07-16 12:23:24
【问题描述】:

在尝试将 ejabberd 与 MySQL 数据库连接时报告错误。这可能与数据库名称有关。在尝试连接另一个没有“-”字符的数据库后,ejabberd 服务器使用 MySQL 数据库成功启动。在 ejabberd.cfg 文件中,我取消注释以下行以使用 MySQL 数据库,并进行其他更改

{odbc_server, {mysql, "localhost", "ejaaberddb-dev", "admin", "password"}}.

错误如下:

@ejabberd_odbc:log:574 p1_mysql_conn: Failed changing to database "ejaaberddb-dev" : "#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-dev' at line 1"

您能否建议我如何从 ejabberd 连接到上述数据库?

【问题讨论】:

    标签: mysql odbc xmpp ejabberd


    【解决方案1】:

    在数据库名称周围添加“`”字符后解决了问题。

    {odbc_server, {mysql, "localhost", "`ejaaberddb-dev`", "admin", "password"}}.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-03-16
      • 2017-07-10
      • 2020-03-25
      • 1970-01-01
      • 2019-08-08
      • 2017-01-08
      • 2014-07-07
      相关资源
      最近更新 更多