Connect to a mysql database on another webserver?
Posted on 2009-12-31
Hello, I have a web server running a php web app off a MySQL database that I created a while back. (the database is constantly being updated every minute or so) There's a second website hosted on another server (different location and ip) that I want to pull some information from the first server and display (and possibly modify). I thought I'd just open the mysql port on the first server's firewall (available only to the second server's IP), and connect via PHP directly to the first server from the second, but I've never done this before so I wanted to see if anyone who's had experience doing this type of thing knows if this is the most secure/efficient way to do what I'm trying to do, or if there's a better way to do this.