Messenger caches user information in memory in a sophisticated way so inserting records directly into the user tables is likely to result in odd behavior or even corrupt Messenger’'s cached information.
If you absolutely must directly insert records into the user table, you should shutdown Messenger so you can be sure it will startup and use the database information consistently. However, I suspect that we can probably solve your problem in an alternative way.
First, anyone logged in as an administrator (e.g. the admin account) can use the standard iq-registration protocol to register other users. So if you have a remote task that needs to add users automatically, you could login as an XMPP client under an admin account, then use the iq-register protocol to register the new user. With Smack that’'s pretty trivial to do.
Second, if you want to disable auto-registration (registration through the XMPP protocol) you can do that in the Messenger web admin interface. Then simply use the web admin interface to add users.
If these two methods won’'t work, could you explain why you want to directly edit the sql tables? Knowing the whole problem should let me suggest a better solution.