Mysql 错误码1418

最近在centos下进行数据库复制时,发现了这个错误,不能创建函数(function)可以复制数据库表,存储过程,唯独函数这里过不了,在网上搜索到解决这个问题的办法:

mysql出现Error Code:1418 错误的解决办法

以下是引用片段:
Error Code : 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)
(0 ms taken)

解决方法如下:

1. mysql> SET GLOBAL log_bin_trust_function_creators = 1;
2. 系统启动时 --log-bin-trust-function-creators=1
3. 在my.ini(linux下为my.conf)文件中 [mysqld] 标记后加一行内容为 log-bin-trust-function-creators=1

原文地址:https://www.cnblogs.com/wenrenhua08/p/3993605.html