By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,967 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,967 IT Pros & Developers. It's quick & easy.

mysql database connection

100+
P: 114
Dear Friends,

Is it necessary to have mysql database on the same hosting? If no, then why can't I connect to my database?

I am trying to connect a mysql database which on www.online.biz and my php script is on www.deepaksaxena.com domain. Is it possible to have connection with mysql server?

Please advice.............

Thanks
Deepak
Apr 30 '07 #1
Share this Question
Share on Google+
2 Replies


cyberking
P: 84
Dear Friends,

Is it necessary to have mysql database on the same hosting? If no, then why can't I connect to my database?

I am trying to connect a mysql database which on www.online.biz and my php script is on www.deepaksaxena.com domain. Is it possible to have connection with mysql server?

Please advice.............

Thanks
Deepak
Hi!
As far as I know its possible. BUt then you would have to specify the ipaddress of the mysql database, i mean the server on which it is present. All I have tried is to connect to my database on my localhost while my php scripts were on my server.
Or is it that you do not have database support on your server, where you have hosted deepaksaena.com ? Let me know and its simple to fix it

Regards
CyberKing
http://www.bytesandbytes.com
May 1 '07 #2

100+
P: 136
Hi deepaks85,

please check hostname, port, database name for connection. As mostly we use database which r hosted on the same server, so sometime we ommit providing all those values.

Alternately check if the database server have client entry of ur hosting server that is database server has recognise ur hosting server as a client for itself. I think database administrator can explain this better than me.

But connecting databases from different server is highly possible. I have done earlier some cross DB connectivity in PHP. Its easy as the way we connect database resides in same server.

susen
May 2 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.