How to set sql_safe_updates via my.cnf? I'm running

mysql  Ver 15.1 Distrib 10.4.10-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2


How can I set the system variable sql_safe_updates via my.cnf? I want it to always be on.
Turns out you can set it in the [mysqld] block. e.g.

[mysqld]
sql_safe_updates        = 1


Test it's set after you connect:

SHOW GLOBAL VARIABLES LIKE 'sql_safe_updates';