Openfire自定义数据库配置

时间:2015-01-18 17:06:05

标签: android xml xmpp openfire

我试图在openfire服务器中使用我的数据库用于在xmpp上运行的android聊天应用程序..但我真的很困惑,因为这是我第一次使用它openfire服务器..我跟着this做了这件事,但它不起作用..我无法在我的数据库中登录用户,当我从管理控制台创建一个新用户时,它没有#&# 39; t出现在我的数据库中..

这里是openfire.xml

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

<jive> 
<adminConsole> 
 <port>9090</port>  
 <securePort>9091</securePort> 
</adminConsole>  
<locale>en</locale>  
<jdbcProvider> 
 <driver>com.mysql.jdbc.Driver</driver>  
 <connectionString>jdbc:mysql://localhost:3306/test</connectionString> 
</jdbcProvider>  
<provider> 
 <auth> 
   <className>org.jivesoftware.openfire.auth.JDBCAuthProvider</className> 
 </auth>  
 <user> 
   <className>org.jivesoftware.openfire.user.JDBCUserProvider</className> 
 </user>  
 <group> 
   <className>org.jivesoftware.openfire.group.JDBCGroupProvider</className> 
 </group> 
</provider>  
<jdbcAuthProvider> 
 <passwordSQL>SELECT password FROM users WHERE username=?</passwordSQL>  
 <passwordType>plain</passwordType> 
</jdbcAuthProvider>  
<jdbcUserProvider> 
 <loadUserSQL>SELECT username,status FROM users WHERE username=?           </loadUserSQL>  
  <userCountSQL>SELECT COUNT(*) FROM users</userCountSQL>  
  <allUsersSQL>SELECT username FROM users</allUsersSQL>  
  <searchSQL>SELECT username FROM users WHERE</searchSQL>  
  <usernameField>username</usernameField>  
  <nameField>status</nameField>  
  <emailField>username</emailField> 
</jdbcUserProvider>  
<connectionProvider>
 <className>org.jivesoftware.database.DefaultConnectionProvider</className>
</connectionProvider> 
<database>
 <defaultProvider>
   <driver>com.mysql.jdbc.Driver</driver> 
   <serverURL>jdbc:mysql://localhost:3306/test? rewriteBatchedStatements=true</serverURL> 
   <username  encrypted="true">0f0bbca3a4ffc907b45a7a3feee84f73efa054b83529edb3</username> 
   <password encrypted="true">935209210060d2ca57188c7b7fac91a26bf316868c4eea59</password> 
   <testSQL>select 1</testSQL> 
   <testBeforeUse>false</testBeforeUse> 
   <testAfterUse>false</testAfterUse> 
   <minConnections>5</minConnections> 
   <maxConnections>25</maxConnections> 
   <connectionTimeout>1.0</connectionTimeout>
 </defaultProvider>
</database> 
<setup>true</setup>
</jive>

我是否需要更改其他任何东西..? :S

0 个答案:

没有答案