MySQL: sql_safe_updates

在my.cnf中设置sql_safe_updates=1 

启动mysqld失败。

error log报错:

2018-11-20T14:28:14.567022+08:00 0 [ERROR] unknown variable 'sql_safe_updates=1'
2018-11-20T14:28:14.567058+08:00 0 [ERROR] Aborting

正确的设置方法为:

在[mysqld]下配置一个ini-file=path/init-file.sql

文件中添加 set global sql_safe_updates=1; 语句

[root@localhost mysql3306]# cat init.sql
set global sql_safe_updates=1;

原文地址:https://www.cnblogs.com/DataArt/p/9990749.html