停止openfire服务
直接在数据库运行:
UPDATE `openfire`.`ofProperty` SET propValue='org.jivesoftware.openfire.auth.JDBCAuthProvider' WHERE name='provider.auth.className'
UPDATE `openfire`.`ofProperty` SET propValue='org.jivesoftware.openfire.group.JDBCGroupProvider' WHERE name='provider.group.className'
UPDATE `openfire`.`ofProperty` SET propValue='org.jivesoftware.openfire.user.JDBCUserProvider' WHERE name='provider.user.className'
INSERT INTO `openfire`.`ofProperty` VALUES
('jdbcProvider.driver', 'com.mysql.jdbc.Driver'),
('jdbcProvider.connectionString', 'jdbc:mysql://localhost:3306/offices?user=root&password=123456'),
('admin.authorizedJIDs', 'joe@iamthat,jane@iamthat'),
('jdbcAuthProvider.passwordSQL', 'SELECT plainPassword FROM myuser WHERE username=?'),
('jdbcAuthProvider.passwordType', 'plain'),
('jdbcUserProvider.allUsersSQL', 'SELECT username FROM myuser'),
('jdbcUserProvider.loadUserSQL', 'SELECT name,email FROM myuser WHERE username=?'),
('jdbcUserProvider.userCountSQL', 'SELECT COUNT(*) FROM myuser'),
('jdbcUserProvider.searchSQL', 'SELECT username FROM myuser WHERE'),
('jdbcUserProvider.usernameField', 'username'),
('jdbcUserProvider.nameField', 'name'),
('jdbcUserProvider.emailField', 'email'),
('jdbcGroupProvider.allGroupsSQL', 'SELECT groupName FROM mygroup'),
('jdbcGroupProvider.descriptionSQL', 'SELECT description FROM mygroup WHERE groupName=?'),
('jdbcGroupProvider.groupCountSQL', 'SELECT count(*) FROM mygroup'),
('jdbcGroupProvider.loadAdminsSQL', 'SELECT username FROM mygroupuser WHERE groupName=? AND administrator=''Y'''),
('jdbcGroupProvider.loadMembersSQL', 'SELECT username FROM mygroupuser WHERE groupName=? AND administrator=''N'''),
('jdbcGroupProvider.userGroupsSQL', 'SELECT groupName FROM mygroupuser WHERE username=?')
重启openfire服务
你发现 OK了是吧
I'm falling off the sky all alone.The courage inside is gonna break the fall. Nothing can dim my light within. I am That I am 程序 = 数据结构 + 算法
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)