powered by Jive Software

MYSQL user auth with JDBC

Hello! I’m new the community but am hoping to find a bit of help.

I’m having some trouble following the directions to keep my existing user database. I think I’ve narrowed down the problem:

Here’s my freshly edited openfire.xml file

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

9090

9091

en

com.mysql.jdbc.Driver

jdbc:mysql://localhost/taskette?user=root&password=mypass

org.jivesoftware.openfire.auth.JDBCAuthProvider

org.jivesoftware.openfire.user.JDBCUserProvider

org.jivesoftware.openfire.group.JDBCGroupProvider

SELECT password FROM users WHERE username=?

SELECT byline,email FROM users WHERE username=?

SELECT COUNT(*) FROM users

SELECT username FROM users

SELECT username FROM users WHERE

username

byline

email

SELECT count(group) FROM users

SELECT group FROM users

SELECT group FROM users WHERE username=?

SELECT group FROM users WHERE group =?

SELECT username FORM users WHERE group =? AND isAdmin=‘N’

SELECT username FORM users WHERE group=? AND isAdmin=‘Y’

org.jivesoftware.database.DefaultConnectionProvider

com.mysql.jdbc.Driver

jdbc:mysql://localhost:3306/chat

root

mypass

select 1

true

true

5

25

1.0

true

After I restart Openfire with sudo /etc/init.d/openfire restart and I get this

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

9090

9091

en

org.jivesoftware.openfire.group.JDBCGroupProvider

SELECT password FROM users WHERE username=?

SELECT byline,email FROM users WHERE username=?

SELECT COUNT(*) FROM users

SELECT username FROM users

SELECT username FROM users WHERE

username

byline

email

SELECT count(group) FROM users

SELECT group FROM users

SELECT group FROM users WHERE username=?

SELECT group FROM users WHERE group =?

SELECT username FORM users WHERE group =? AND isAdmin=‘N’

SELECT username FORM users WHERE group=? AND isAdmin=‘Y’

org.jivesoftware.database.DefaultConnectionProvider

com.mysql.jdbc.Driver

jdbc:mysql://localhost:3306/chat

root

mypass

select 1

true

true

5

25

1.0

true

**Any ideas on why Openfire changes my config settings on me?**

I’ve tried to hand-fix it by going into the ofProperties table but that doesn’t seem to work either.

Better link for before and after openfire.xml:

Before: http://pastebin.me/49b8d2458d6bf

After: http://pastebin.me/49b8d2b9966e2

Could get this to work with 3.6.3.

Uninstalled and tried Openfire 3.3.2 – it’s working without a problem.