Don't know what mught be causing that. Maybe this change OF-697
You can try copying /openfire/lib/mysql.jar from 3.8.2 installation into 3.9.1 and see if this works. Though if you going to use older jdbc connecter, you will face the problems which users were having with older jdbc and newer mysql versions.