当前位置:首页 > 数据库 > Mysql

MySQL数据库开启、关闭、查看函数功能的方法

应用 mysql 时,会遇到不能创建函数的情况。出现如下错误信息: error 1418 : this function has none of deterministic, no sql, or reads sql data in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_tru

应用 mysql 时,会遇到不能创建函数的情况。出现如下错误信息:


error 1418 : this function has none of deterministic, no sql, or reads sql data in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

那是因为没有将功能开启。

开启mysql函数功能:


set global log_bin_trust_function_creators=1;

关闭mysql函数功能:


set global log_bin_trust_function_creators=0;

查看状态:


show variables like '%func%';


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!