MySql question

For users or potential users.
Post Reply
gorilla121
Posts: 17
Joined: Sun Jan 09, 2011 2:59 pm

MySql question

Post by gorilla121 » Wed Jan 22, 2014 4:26 am

I have a main server and a backup server. Is it absolutely required that you turn off MySQL on the backup server? All the computers are pointing to the main opendental database. I've read on the forums that people turn off the MySQL on the backup server but I was wondering if this was more of a safety thing so that you don't accidently have two live databases that you could be writing to.

KevinRossen
Posts: 293
Joined: Mon Apr 22, 2013 8:49 am
Location: Dallas, TX
Contact:

Re: MySql question

Post by KevinRossen » Wed Jan 22, 2014 6:49 am

From my experience, the reason you turn off MySQL on the backup server is to make sure the backups are copied properly. I don't think the files would copy properly to the backup server if it's still running there.
Kevin Rossen
Office Manager, Rossen Dental
Founder, DivergentDental.com
Image

User avatar
jsalmon
Posts: 1565
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: MySql question

Post by jsalmon » Wed Jan 22, 2014 7:26 am

I like to think about it in a really basic way. Pretend MySQL is a man. It can only pay attention to one thing at a time. Every time you create an appointment, refresh the Chart module, etc. you are talking to MySQL and it blocks everything else out in the world and only pays attention to you. Thus, if you run a backup at the same time that it's paying attention to someone, your backup will be frozen in that state (tables could be locked) and the backup is essentially useless.

Long story short, the only way to guarantee a good backup is to stop the service (not allow anyone to talk to MySQL) and back it up. It doesn't hurt to leave the service running (especially is you do backups when no one is at the office talking to MySQL) and try to make a backup. If you plan on doing this, you have to verify each backup was successful just to make sure the situation of a locked table did not occur. Otherwise, you'll loose whatever data it was in the middle of changing, inserting, etc... Some people are fine with this possibility and have MySQL backup automatically without stopping the service.
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

Post Reply