It’s not an good idea to play around in the database while Openfire is running, since Openfire does cache parts of that database. However adding users does work, other things like roster or groups do not.
The best way to add users is to use Openfire’s internals for that:
It’s easy to store encrpyted passwords.
Your plugins are notified if an new user was created.
You can easily write an plugin is able to create users on HTTP requests. (see Registration plugin for that)