如何使用Openfire.xml将Openfire配置为使用自定义数据库? [英] How do I configure Openfire to use custom database using openfire.xml?

查看:154
本文介绍了如何使用Openfire.xml将Openfire配置为使用自定义数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Openfire尝试了本指南文档,但我的更改似乎都没有应用.即使将用户名设置为admin,我也无法以任何用户身份从我的自定义数据库登录.我需要手动将所有更改应用于存储在数据库(Openfire的ofProperty表)中的系统属性吗?

I tried out this guide from the Openfire documentation but none of my changes seem to have been applied. I can't login as any of the user from my custom database even if I set user names as admin. Do I need to manually apply all the changes to the system properties stored in the database (Openfire's ofProperty table)?

我还想知道是否有一种方法可以阻止或自定义Openfire将添加到我的数据库中的表.

I'd also like to know if there's a way to prevent or customize which tables Openfire will add to my database.

推荐答案

这是设置外部数据库(在我的情况下为MySQL)的工作:

Here's what I did to setup external database (in my case MySQL):

假设您有一个正在运行的Openfire实例,则应停止服务器并编辑openfire.xml

Assuming that you have a running Openfire instance, you should stop the server and edit the openfire.xml

只需添加<setup>false</setup>,以便下次打开Web界面时,您将被定向到设置页面,该页面将允许您选择和设置数据库服务器.

Just add <setup>false</setup> so next time you open the web interface you will be directed to the setup page which will allow you to select and setup your database server.

从Openfire安装目录中,从/resources/database复制SQL查询(为您的特定数据库选择一个,在我的情况下,我使用openfire_mysql.sql)

From Openfire install directory copy the SQL query from /resources/database (choose the one for your specific database, in my case I used openfire_mysql.sql)

当然,您需要设置特权.

Of course you need to setup privileges.

从那里开始,我只是跟随向导,并在设置数据库时将信息放在输入字段中,例如我在phpMyAdmin特权中设置的IP地址,用户名和密码.一切都应在数分钟内启动并运行.

From there I just followed the wizard and put the information in the input fields when setting up the database, like IP address, username and password that I have setup in the privileges in phpMyAdmin. Everything should be up and running within minutes.

如果从Web界面设置数据库时遇到错误,请尝试检查数据库服务器MySQL端口3306是否打开.如果没有,请执行一些sudo iptables.

In case you get error when setting up the database from the web interface, try to check if your database server MySQL port is open, its 3306. Do some sudo iptables if its not.

希望这会有所帮助.

这篇关于如何使用Openfire.xml将Openfire配置为使用自定义数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆