Welcome to JavaRanch.
I'm not sure I understand the problem. You have two programs that connect to a database (presumably using
JDBC in some form); the first one to read and write, the second read-only. Is that correct? If so, can't the second one connect to the DB in the same way as the first?
Having said that, I wouldn't open up a database for straight JDBC access over the internet. I'd probably use an intermediate server that proxies the requests, and also takes care of encryption.
As an aside, please use punctuation like you would normally in written communication; this isn't IRC or IM. It's much easier to understand (and you do want to make it easy to understand for other people, so that they're in a better position to help you).