SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Oct 16, 2002, 02:28 #1
- Join Date
- Nov 2000
- Location
- Oslo, Norway
- Posts
- 413
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Moving MySQL database between hosts
Hi,
I'm appraching the move of a PHP&MySQL based site from one host to another and though I've moved several sites before, I've never had to move one where the content is constantly updated, meaning the MySQL database. So, I'm looking for pointers as to how to make the move as smooth as possible without loosing any data.
A farily obvious thought that has crosse my mind is to have both sites using the db on the old host during the transition period, and then change to localhost on the new site once the DNS is completely up to date. Is this a guide idea, and if so, is this as easy as replacing 'localhost' in the mysql_connect() function with the IP address of the old/existing host?
And if I were to go this way, how would I move the db content once the transition period is done without loosing any data that might be updated while I download and upload the .sql files?
Thanks in advance!
-
Oct 16, 2002, 02:49 #2
- Join Date
- Apr 2002
- Location
- Melbourne
- Posts
- 707
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I don't know if that is possible at all to move between sites without any downtime at all.
I think you should advise of the transfer well in advance and set a date and time for the transfer to take place. The longest your site will be off is as long as it takes to propagate a domain.
I've done this before on a site with database changes every 2 minutes... and your customers will know that upgrades are necessary and so they will not complain. Just make sure that they are notified of this though prior to your move.Websites: DH Softwares|Arcade Online|Bizarre Facts|Fun Arcade
More sites: Gin Recipes|High Score Games|Cool Free Online Games
Really Funny Clips at ReallyFunnyClips.com
-
Oct 16, 2002, 03:11 #3
- Join Date
- Nov 2000
- Location
- Oslo, Norway
- Posts
- 413
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
But, regarding what I suggested; is that a good approach?
-
Oct 16, 2002, 04:52 #4
- Join Date
- Apr 2002
- Location
- Melbourne
- Posts
- 707
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, I guess that is a good idea...
And after readin gyour post carefully, it is just a matter of switching the IP address and localhost. But you need to make sure that you can access the database via the IP address.
Check that the Host inside MySQL is a % and not localhost. You can ask your web host if you're unsure.Websites: DH Softwares|Arcade Online|Bizarre Facts|Fun Arcade
More sites: Gin Recipes|High Score Games|Cool Free Online Games
Really Funny Clips at ReallyFunnyClips.com
-
Oct 16, 2002, 05:00 #5
- Join Date
- Nov 2000
- Location
- Oslo, Norway
- Posts
- 413
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
OK, thanks a lot dragonhawk!
Bookmarks