0

I'm working on a website that will be highly data-driven. Naturally this calls for databases (and lots of them). I am very new to this kind of web development so I was looking up how all this is done and how to sync any work I do before I get started, as I'm not interested in doing any work twice. The answer I'm finding seems to be pretty much "You can't sync them" for someone in my (very novice) situation. I've read something about a master/slave connection you can make, but it's very unlikely that the average web server will allow this. I've checked and I'm pretty sure mine doesn't (1&1).

SO! If it isn't possible to sync my local database with my live website database (when it comes into existence), then what is the point of using a local database at all?

Does anyone have any advice on the most efficient way to work with a non-syncable local or live database? Would there be any advantages to working with one over the other?

EDIT - I should mention this website is currently being built on my local WAMP server. It is not currently live online.

Shirley Dodson
  • 341
  • 4
  • 24
  • Just for clarity's sake; does this website currently exist and in use, or are you going to be building it first? Your story is a little ambiguous to me. I think we may have different definitions of the word 'sync' – Jeroen Smit May 30 '15 at 21:55
  • @Jeroen Smit - I'm in the process of building it. It exists on my local WAMP server, not online. I've gotten to the point where I want to try and figure out how to get the website to interact with a database. – Shirley Dodson May 30 '15 at 22:01
  • 1
    Ah, that clears it up. Generally when talking about syncing databases you're going to end up with master-slave or anything similar. You won't have to worry about anything. Just develop your website and populate your database locally. Once you're done developing, export it and import it again on your server. – Jeroen Smit May 30 '15 at 22:03
  • @Jeroen Smit - I read that master/slave situations were difficult to install and most web servers don't work with them? It's very possible I misunderstood. Is there a website you could point me too that's good for novices that can explain this to me? And if master/slave IS an option, is it permanently tied to one local host (my current computer) or can that change in the future? – Shirley Dodson May 30 '15 at 22:21
  • 1
    Master slave definitely is *not* what you're looking for. It's not relevant for development, with some exceptions aside. This isn't one of them. All you need is a database export that you can import when you're done. I'm going to go on a limb here and guess you're using MySQL. You can have a look [here](http://stackoverflow.com/questions/4973341/mysql-dump-database-restore) on how to export and import databases for that. If you're using PHPMyAdmin, it's even easier as you can just do it through the interface if you want. – Jeroen Smit May 30 '15 at 22:26
  • @JeroenSmit - Ok, so exporting and importing are possible. That's good to know. It's not syncing, but it's also not doing all the work twice. I didn't quite understand the link you gave me, but I'm sure that's just because I'm new at this and it's just over my head at the moment. I think for now I'll create a few dummy databases and practice exporting/importing so I understand how that works before I start work on the real ones. Any more tip or advice you're willing to share? Oh, and yes, I'm using MySql and PHPMyAdmin. – Shirley Dodson May 30 '15 at 23:14
  • are you fix your problem?same situation for me . can you help me @ShirleyDodson – Karthi Dec 21 '16 at 13:19

0 Answers0