Current location: Hot Scripts Forums » Programming Languages » PHP » Is it possible to Connect to a Mysql DB in a Remote Server


Is it possible to Connect to a Mysql DB in a Remote Server

Reply
  #1 (permalink)  
Old 03-29-06, 05:52 AM
vinochan vinochan is offline
Newbie Coder
 
Join Date: Mar 2006
Location: Cochin, Kerala, India
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Is it possible to Connect to a Mysql DB in a Remote Server

Is it possible to Connect to a Mysql database located in Server_A from Server_B using PHP. If yes please tell me

I've tried the following.. but no results
mysql_pconnect('remoteserver.com','USERNAME','PASS WORD') or print("connection problem");

thanks in advance
Reply With Quote
  #2 (permalink)  
Old 03-29-06, 06:08 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Yes, but you need a special server for this. I think they're pretty expensive. The server from the company where I work has that feature and we're paying 350 $/year.
Reply With Quote
  #3 (permalink)  
Old 03-29-06, 06:29 AM
vinochan vinochan is offline
Newbie Coder
 
Join Date: Mar 2006
Location: Cochin, Kerala, India
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
thank you nico_swd

If I have the special server you mentioned, is there any thing extra to be added to mysql_pconnect()

regards

vinochan
Reply With Quote
  #4 (permalink)  
Old 03-29-06, 06:51 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Reply With Quote
  #5 (permalink)  
Old 03-29-06, 12:15 PM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
You dont need a "special server" just enter the domain like you have done. The only thing is it may need some configuration, for example if you have cpanel you have to add the ip your connecting from to the access list, in order to access the database.
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
  #6 (permalink)  
Old 03-29-06, 03:26 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Well, I got told that most servers don't support external database access. Would be good they would though, this way we wouldn't have to pay 350 $ for it.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Has anybody used SourceAnyWhere,could you help me out? xutaokelly Windows .NET Programming 0 08-22-05 05:41 AM
PHP scripts unable to connect to DB after MySQL 4.1.10 upgrade Jason L PHP 3 03-08-05 12:32 AM
Changing Sequal server db to MySQL Mehre PHP 1 04-20-04 02:25 AM
Error while creating database (Errornumber 2002: "Can't connect to local MySQL server lylesback2 PHP 5 04-11-04 01:37 PM
Is there any way I can link MS Access to a MySql on a remote web server (ISP)? xmxpcom PHP 2 11-12-03 03:33 AM


All times are GMT -5. The time now is 07:06 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.