1

I've got a third-party application that uses MySQL as a backed. The next version will have support for our backup system, but before we upgrade we would like to take a backup. Catch 22! I am not a DBA, and our DBA staff isn't familiar with MySQL, so I'm pretty much on my own. Our server has lots of space and CPU cycles, so I would like to test the restore on that machine, without overwriting the production data. So my question is, should I install another instance of MySQL on the same computer in a different location, or is there a way to restore my data to an alternate database on the existing server?

samwyse
  • 2,760
  • 1
  • 27
  • 38
  • generate the script. look at the top of it. it may create a database if it does not exist, or it may do a `use thisDatabase` etc Look there first. Tweak it accordingly or publish a few lines of it so we can take a look. It is quite simple, no install needed – Drew Sep 21 '15 at 17:40
  • 1
    **Caution:** In the backup can also system tables like **user** and **grants** of your system. So it danger to do this even is there the mysql Schema included or not. If it not in the dump you are missing it first when you import it on a new server. And when the dump was made without "-R" option, all function and stored Procedures are not included. the best way to check it is to start a second mysqld on the same machine on a other PORT with a separate (emtpty) DATADIR and include it on this – Bernd Buffen Sep 21 '15 at 17:49

2 Answers2

1

Your quite right that a backup isn't worth a tinker's curse unless you know you can restore it.

I would like think I know what I'm doing with a MySQL database, and in theory its possible to test the restore of a MySQL database, but not an entire MySQL instance on an existing machine. But personally I would be doing this very carefully and only as a an absolute last resort. There's just too much to go wrong.

MySQL will run on all sorts of operating systems, and with very little overhead (if you so configure it). Setting up a test machine is so easy, you also need a very good reason not to set up a new instance to test the backup on.

symcbean
  • 47,736
  • 6
  • 59
  • 94
1

If you are not familiar with MySQL. The preferable option would be to install MySQL on another machine, ideally with the same OS and test your restore there. It's free to install and any extra time taken to install MySQL (About 15 minutes with the Wizard) far outweighs the effort it would take to restore your live system if you make a mistake and break it.

If that is not an option and you really do want to restore on the same machine. Then your question has already been answered and voted for on stackoverflow. Multiple MySQL instances on a single machine

Community
  • 1
  • 1
Steve E.
  • 9,003
  • 6
  • 39
  • 57