How do I configure Openfire to use custom database using openfire.xml?

回眸只為那壹抹淺笑 提交于 2019-12-08 09:38:15

问题


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)?

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


回答1:


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

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

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.

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.

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.

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.

Hope this helps.



来源:https://stackoverflow.com/questions/7122019/how-do-i-configure-openfire-to-use-custom-database-using-openfire-xml

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