# Prevent MySQL from automatic restart after a crash

**URL:** <https://forums.percona.com/t/prevent-mysql-from-automatic-restart-after-a-crash/1872>\
**Category:** Other MySQL® Questions\
**Created:** [August 23, 2012, 6:26am UTC](https://forums.percona.com/t/prevent-mysql-from-automatic-restart-after-a-crash/1872 "2012-08-23T06:26:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbabut](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@tbabut](https://forums.percona.com/u/tbabut)\
**Post date:** [August 23, 2012, 6:26am UTC](https://forums.percona.com/t/prevent-mysql-from-automatic-restart-after-a-crash/1872/1 "2012-08-23T06:26:27Z")

</div>

Hi,

is there an option to avoid the automatic restart of the MySQL daemon itself after a crash?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [August 24, 2012, 6:48am UTC](https://forums.percona.com/t/prevent-mysql-from-automatic-restart-after-a-crash/1872/2 "2012-08-24T06:48:42Z")

</div>

Hi Thomas,

AFAIK, If you start mysqld normally using startup script or as a service and if mysqld would crash than mysqld\_safe would restart it automatically because mysqld\_safe is the control script, which is responsible for automatic starting mysqld. However, if you start mysqld directly like : “/usr/sbin/mysqld &” then if it crashes it should not be restarted automatically.
