User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 391,771 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,277 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 1447 | Replies: 3
Reply
Join Date: Feb 2005
Posts: 74
Reputation: tones1986 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
tones1986 tones1986 is offline Offline
Junior Poster in Training

external database connection

  #1  
Feb 2nd, 2008
Hi guys. I wanted to know if something would be possible. I currently have a server that runs mySQL and i created a database on there for use with PHP-Nuke Treasury module. I don't know much in the way of MySQL besides the basics. I uploaded the .sql file to the database without any problems.

Is there then a way i can connect to this database (say is on oldsite.net) from my other web server (say, newsite.net which is currently without MySQl for a while)?

Lets say the database is called "myDatabase" with user "database" with password "password" given full access privileges. How could i then connect to this database using a script on my newsite.net server?

Any ideas? I tried simple things like oldsite.net as server instead of localhost - but as i said, im new to this MySQL thing.

I also enabled newsite.net to be allowed remote access to oldsite.net - but still wont work

Any questions? Answers? Help? --- much appreciated in advance.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 238
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: external database connection

  #2  
Feb 2nd, 2008
I dont know if this can help, but read out the user comments in this page.
Cheers,
Naveen
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Feb 2005
Posts: 74
Reputation: tones1986 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
tones1986 tones1986 is offline Offline
Junior Poster in Training

Re: external database connection

  #3  
Feb 4th, 2008
I tried the link and it was somewhat useful - but i still couldnt get a connection, if i place the exact same file on the actual server the database is on, the connection works, anywhere else, i cant get a thing working...any more ideas?
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,137
Reputation: peter_budo has a spectacular aura about peter_budo has a spectacular aura about peter_budo has a spectacular aura about 
Rep Power: 10
Solved Threads: 257
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: external database connection

  #4  
Feb 4th, 2008
I'm not into PHP but maybe this can help
Originally Posted by http://forums.mysql.com/read.php?108,117760,117763#msg-117763
You can put the IP address of the machine or its name there. However, you must make sure that remote access has been authorized. It is disabled by default.
Secondly there is another post
Originally Posted by http://kb.mediatemple.net/article.php?id=236
When attempting to connect externally to your MySQL server through a database-management software (Such as Navicat or MySQL GUI Tools), you will run into problems being able to connect. Typical error messages include "Lost connection to MySQL server" or "Access Denied", or some other text describing a difficulty in establishing the connection. The reason this happens is because we secure your database access to limit external connections only to IP addresses you've explicitly declared on your External Database IP Access List.
So try to cennect with IP or name of your old domain. If this doesn't work speak with your old provider about DB setup.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 4:42 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC