Jump to content


Photo

access mysql db from another server


  • Please log in to reply
2 replies to this topic

#1 black.horizons

black.horizons
  • Members
  • PipPipPip
  • Advanced Member
  • 78 posts

Posted 03 March 2006 - 03:10 PM

Hi there,

I have MySQL database sitting on one server, and I have a website residing on another server, the one with the database is a personal server, and the website is a club site I'm running. The club can't afford £180 a year for MySQL access but my own server already has it running for £30 a year...so I want to know how (if its possible) to connect from server A to server B. the PHP file for the club resides on the club server, and the db it's meant to access resides on another server.

Thanks in advance,

Alex

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 March 2006 - 07:23 PM

All you have to do is specify an IP address instead of localhost in the connection string. Of course, you'll need to make sure that your server is set up to allow external connections.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 SpectralDesign.Net

SpectralDesign.Net
  • Members
  • PipPip
  • Member
  • 15 posts
  • LocationToronto, Ontario

Posted 04 March 2006 - 04:28 AM

Also, it sounds like a good opportunity to learn how to get your MySQL server to use SSL! (Not that I can tell you how, but it's something on my plate to learn as well... After I get my 6-table many-many-many thingy figured out I'll be moving on to the MySQL security issues.

Maybe I'll post a tutorial on my website for both issues when the time comes, because I'm not having much luck finding a resource that I can wrap my head around for the many-many-many issue, and thre can never be too many security tutorials :)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users