Click to See Complete Forum and Search --> : Is there ANY way to use my online SQL database for offline development???


Mindman
06-10-2005, 05:50 PM
Here's my setup:

I develop my PHP pages offline with an Apache testing server, then I upload them to my Web host. I'm starting to use SQL though now, and I'm already starting to see that it's going to be a pain to create a separate database offline from the one I will be using online, because I'd like to see the same contents even when I'm developing on my testing server to keep it simple and accurate on both sides.

It would seem to me that there should be a way to get PHP to connect to the online database when working on my testing server, or some way to keep the online and offline SQL databases perfectly in sync. If ANYONE can help, it would be GREATLY appreciated. :)

BeachSide
06-10-2005, 06:57 PM
Depending on what your doing you have a couple of options...

If you can work with the data that is already in the database simply export an SQL dump file and insert it into your local db then connect to that and do all your dev locally

If you need to work with changing live data you could get a tool such as SQLyog or Navicat to sync the dbs and work like that.

I don't know of a way to connect locally as most hosting companys do not allow you to connect remotely. These tools allow http tunneling but you have to pay for them to get those features.

Stephen Philbin
06-10-2005, 07:12 PM
Aye. IF the database allows remote connections then just change "localhost" to the host name of the server in the connection query. Failing that I'd definitely just take a dump from the db and use that as sample data to work with offline.