I've never tried something like this, so the following is just guesswork:
1) Remember that if you are on an LPCP server (not a cPanel server), your database host is not "localhost" but some specific domain name, e.g., sqldb001.lunarzit.com.
2) I'm not sure which field is naming the database, but in most applications (e.g., PHP) it has to be your ACCOUNTNAME_dbname. Probably the same is true here.
3) In most applications, a user name also must be prefixed with ACCOUNTNAME_. Hopefully your users won't have to do that when they type in their ID.
Good luck!
Thank you for your reply,
I am on a cPanel server. Yes my databases are prefixed with my accountname. I am pretty familiar with setting up php sites to read mysql databases but for some reason this .htaccess is missing something.
Thanks