Hey dude, Are you still wanting help?
If so:
a) What proxy server is being used? (This will help with specific answers)
b) Generally what needs to happen is:
On the proxy server, setup a port that directly connects to a specific host (in this case the external database server). There are three bits (at minimum) that you will need to configure.
1) destination host eg: db.blah.com
2) destination port eg: 3306
3) proxy port eg: 13306
On the php app, connect to yourProxyAddress:13306 as if it were actually the db server.
So the above solution was using the proxy as you asked. Alternativley, you could set up routing/port forwarding. If you're using linux, this solution is likley to be way faster and more reliable than any proxy solution you could use. You basically use the same info as the proxy solution above, but you have more control over how it happens [note that traffic accounting will not be as easy to do... but not out of the question 😉]. When you read the howtos, this looks really complicated, but really isn't all that hard.
Basically, you need to make sure that specific ports can establish connections out and only established connections on that port can come in. IE don't allow outsiders to connect into you. 😉
How to do it, depends a lot on your setup. So rather than me telling you lots of stuff you don't need/want to know or already know, I'll stop here and if you want more information, just let me know what you want to know and what stuff you are using. eg which OS (on the proxy server), proxy server etc
As a side note. If you are using windows, there used to be some really useful tools for this type of thing by a group called AnalogX
I don't know if there will be anything useful for what you want. I needed it in ages, but it might help.
Hmmm, just looking at what's there. It may be worth trying:
http://www.analogx.com/contents/download/network/pmapper.htm
Right, I really have to get back to work. Feel free to ask if you want more information.