Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an embedded device running a MySQL database with a web based application.

The problem is when I shutdown my embedded device it just cuts off the power, and I can not have a controlled shutdown. Given this situation how can I configure MySQL to prevent it from failures and in case of a failure, I should have maximum support to recover my database.

While searching this, I came across InnoDB Engine as well as some configuration options to set like sync_binlog=1 & innodb_flush_log_at_trx_commit=1. I have noticed my default Engine is InnoDB and binary logs are also enabled.

What are other configurations to make for best possible failure & recovery support?

I have absolutely no experience with databases and MySQL.

share|improve this question
It might just be me but it seems like you are flirting with an XY problem. An embedded device running a MySQL database and a web server seems like you're asking a lot, or using some very customized hardware that isn't applicable to our general audience. Regardless you are probably going to need some specialized code/fail safes if you expect power to be cut at any time. This isn't the standard operating model of most RDBMS. – Erik Oct 1 '15 at 20:32

You can do many things to prevent this.

  1. Move DB server to somewhere else (hosting)
  2. Buy an UPS
  3. Change to a simpler DB software (SQLite, Files)
  4. Make your code to always save the latest changes, so when power up, programs keep running from last saved point.
share|improve this answer

Your Answer


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.