Connecting Mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sanoj_av
Forum Newbie
Posts: 1
Joined: Mon Apr 26, 2010 11:38 pm

Connecting Mysql

Post by sanoj_av »

I dont know is it the right place to ask this question. forgive me if not.
I have one Mysql database running in one free database hosting web site which also support PHP and CGI. And I have a local java application that interact with the database. everything is working fine when I use my application from my home laptop. but it doesnt work from my office desktop because of a firewall between our organisation network and the internet.However I can access the website create tables,query data and all other things through the hosting website url. ie, the site itself is not a black listed one in the firewall. But my java program cannot connect to it beacuse the TCP/IP connection going outside the network is blocked by the firewall where as http request to the specified website is allowed.

Now my question is that can I make use of PHP to connect to the database? that is my java application communicate to the PHP program on the hosting website through hhtp connection and the PHP code inturn communicate with the Mysql Server and send me back the result.I may be asking a foolish question as I am not familiar with PHP and its working. can anyone of you show me a way ?

Regards,
Sanoj
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Re: Connecting Mysql

Post by a94060 »

Instead of doing what you are saying, it could be possible to just use ssh? If not, you may want to look into http tunneling? http://en.wikipedia.org/wiki/HTTP_tunnel

I personally have never used it but I think that may be what you are looking for.
Post Reply