Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Question: Is there a way to test for correctness once the SQL DB copy has been installed on the local machine so I can confidently move to step number 3? Is there any information on the web that would help with the below goals? Are the below goals even possible or a good idea?

Info: I would like to set up a VM server on my local computer which will serve pages in the exact same way as my current hosting(but only to me on my local computer). I currently pay a big web hosting company to host my website & web store and they are doing a great job, but I would like to be able to work on my Web store and its corresponding MySQL database without being at risk of messing something completely up on the live servers.

My current plan of action:

  1. Set up a VM with debian server, MySQL, PHP, Apache(or something else)
  2. Copy my current MySQL databases from my hosting provider and install on VM server.
  3. Copy web store (PHP/HTML) code to VM server.
  4. Modify and test new features on VM server.
  5. upload MySQL DB and HTML/PHP code back to web host's server where it should work as before but with new modifications.

Now I'm pretty sure I have step one down correctly but I can't for the life of me figure out where to began for steps 2 and 3. I've looked online for resources about how to make a 1 to 1 copy and install the database on a different machine but none of the information seems to be working or correct for my SQL DB (MySQL).

share|improve this question
Hmmm, can you define correctness.. Do you mean CRC checking the database or something. – bybe Mar 24 at 18:58
pretty much just making sure it works exactly the same on the VM as it does on my live host. I've taken 1 MySQL class in my collage career so I'm not a complete noob, which means I know that just copying the values in the table aren't enough I also need other db variables. – TdotThomas Mar 25 at 16:56

1 Answer

Downloading the entire mysql db will also ensure that the configuration variables (such as domain name, server path, et al) are also copied. These things may not be the same on your test server.

Find a way to setup an empty webstore, export data from your live and import to your test. The way you would do for a WordPress installation.

share|improve this answer
How do I download the entire MySQL DB and install it on my VM? – TdotThomas Mar 26 at 0:00
mysqldump command – Prasad Mar 26 at 4:39
are there any tests I could run to make sure everything is working the same? – TdotThomas Mar 31 at 7:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.