AnsweredAssumed Answered

openfire custom database integration

Question asked by openfirebeginner on Apr 8, 2014
Latest reply on Apr 9, 2014 by SnakeDoc



I want to connect to mysql database and get the users values.After reading this



I made openfire.xml like this


<?xml version="1.0" encoding="UTF-8"?>




    This file stores bootstrap properties needed by Openfire.

    Property names must be in the format: ""

    That will be stored as:










    Most properties are stored in the Openfire database. A

    property viewer and editor is included in the admin console.


<!-- root element, all properties must be under this element -->



    <!-- Disable either port by setting the value to -1 --> 





  <!-- Network settings. By default, Openfire will bind to all network interfaces.

      Alternatively, you can specify a specific network interfaces that the server

      will listen on. For example, This setting is generally only useful

       on multi-homed servers. --> 












      <serverURL>jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true</ serverURL> 



      <testSQL>select 1</testSQL> 











    <connectionString>jdbc:mysql://localhost/openfire?user=root&amp;password=123</c onnectionString>








    <passwordSQL>SELECT password FROM user WHERE name=?</passwordSQL> 




    <loadUserSQL>SELECT name,email_address FROM user WHERE username=?</loadUserSQL> 

    <userCountSQL>SELECT COUNT(*) FROM user</userCountSQL> 

    <allUsersSQL>SELECT username FROM user</allUsersSQL> 

    <searchSQL>SELECT username FROM user WHERE</searchSQL> 








Now I re run the openfire and when i launch admin then I do not get any datafrom the database.Can any body please tell me what wrong I am doing?