openfire用户认证迁移数据库.pdfVIP

  • 38
  • 0
  • 约5.6千字
  • 约 10页
  • 2017-06-07 发布于河南
  • 举报
openfire用户认证迁移数据库

OpenFire将用户认证功能迁移出来,与自己的数据库进行整 合。 OpenFire 即可以使用嵌入式数据库管理用户,也可以使用外部数据库,例如 sqlserver ,mysql等等。 原来的数据库配置: 我的mysql 的数据库是test,用户是root,密码是:123456 在mysql 中建立新的schema mydb,然后在下面建立新表 CREATE TABLE `users` ( `username` varchar(64) NOT NULL, `plainPassword` varchar(32) DEFAULT NULL, `encryptedPassword` varchar(255) DEFAULT NULL, `name` varchar(100) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `creationDate` char(15) NOT NULL, `modificationDate` char(15) NOT NULL, PRIMARY KEY (`username`), KEY `users_cDate_idx` (`creationDate`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `myGroups` ( `groupName` varchar(50) NOT NULL, `description` varchar(255) DEFAULT NULL, PRIMARY KEY (`groupName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `myGroupUsers` ( `groupName` varchar(50) NOT NULL, `username` varchar(100) NOT NULL, `administrator` tinyint(4) NOT NULL, `isAdmin` char(1), PRIMARY KEY (`groupName`,`username`,`administrator`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 然后修改配置文件:openfire.xml 1 ?xmlversion=1.0encoding=UTF-8? 2 3 !-- 4 This file stores bootstrap properties needed by Openfire. 5 Property names must be in the format: prop.name.is.blah=value 6 That will be stored as: 7 prop 8 name 9 is 10 blahvalue/blah 11 /is 12 /name 13 /prop 14 15 Most properties are stored in the Openfire database. A 16 property viewer and editor is included in the admin console. 17-- 18!-- root element, all properties must be under this element -- 19jive 20 adminConsole 21 !-- Disable either port by setting the value to -1 -- 22 port9090/port 23 securePort9091/securePort 24 /adminConsole 25 localeen/locale 26 !--Network settings.By default, Openfire will bind to all network interfaces. 27 Alternatively,youcanspecifyaspecificnetwork int

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档