# How to stop mysql writes globally for certain period of time?

**URL:** <https://forums.percona.com/t/how-to-stop-mysql-writes-globally-for-certain-period-of-time/14800>\
**Category:** Percona Distribution for MySQL\
**Created:** [March 18, 2022, 2:27pm UTC](https://forums.percona.com/t/how-to-stop-mysql-writes-globally-for-certain-period-of-time/14800 "2022-03-18T14:27:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![preethi\_subbu](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/preethi_subbu/32/3204_2.png) [@preethi\_subbu](https://forums.percona.com/u/preethi_subbu)\
**Post date:** [March 18, 2022, 2:27pm UTC](https://forums.percona.com/t/how-to-stop-mysql-writes-globally-for-certain-period-of-time/14800/1 "2022-03-18T14:27:09Z")

</div>

Checking something similar to `FLUSH TABLES WITH READ LOCK` but need to stop writes even when the current session where the above command issued is active.

Changing user privileges throw error to user. So thinking of any better way of freezing writes in MySQL. Any leads would be helpful.

Thanks ahead!

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [March 18, 2022, 2:38pm UTC](https://forums.percona.com/t/how-to-stop-mysql-writes-globally-for-certain-period-of-time/14800/2 "2022-03-18T14:38:05Z")

</div>

Hello, check out [super-read-only option](https://www.percona.com/doc/percona-server/5.6/management/super_read_only.html)

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [March 18, 2022, 3:02pm UTC](https://forums.percona.com/t/how-to-stop-mysql-writes-globally-for-certain-period-of-time/14800/3 "2022-03-18T15:02:53Z")

</div>

I’d like to understand your need for this. Can you explain the use case?

`SET GLOBAL super_read_only=1`

---

<div class="post-metadata">

**Author:** ![preethi\_subbu](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/preethi_subbu/32/3204_2.png) [@preethi\_subbu](https://forums.percona.com/u/preethi_subbu)\
**Post date:** [March 22, 2022, 4:12am UTC](https://forums.percona.com/t/how-to-stop-mysql-writes-globally-for-certain-period-of-time/14800/4 "2022-03-22T04:12:39Z")

</div>

Need to freeze writes in MySQL level during DC switch. Any option available in community edition ?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [March 23, 2022, 3:10pm UTC](https://forums.percona.com/t/how-to-stop-mysql-writes-globally-for-certain-period-of-time/14800/5 "2022-03-23T15:10:05Z")

</div>

@preethi_subbu, yes, see above.
